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 // This is forked from Dart revision df52deea9f25690eb8b66c5995da92b70f7ac1fe | 5 // This is forked from Dart revision df52deea9f25690eb8b66c5995da92b70f7ac1fe |
6 // Please update the (git) revision if we merge changes from Dart. | 6 // Please update the (git) revision if we merge changes from Dart. |
7 // https://code.google.com/p/dart/wiki/GettingTheSource | 7 // https://code.google.com/p/dart/wiki/GettingTheSource |
8 | 8 |
9 #include "vm/globals.h" // NOLINT | 9 #include "vm/globals.h" // NOLINT |
10 #if defined(TARGET_ARCH_ARM) | 10 #if defined(TARGET_ARCH_ARM) |
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
542 ASSERT((rd % 2) == 0); | 542 ASSERT((rd % 2) == 0); |
543 if (TargetCPUFeatures::arm_version() == ARMv5TE) { | 543 if (TargetCPUFeatures::arm_version() == ARMv5TE) { |
544 const Register rd2 = static_cast<Register>(static_cast<int32_t>(rd) + 1); | 544 const Register rd2 = static_cast<Register>(static_cast<int32_t>(rd) + 1); |
545 str(rd, Address(rn, offset), cond); | 545 str(rd, Address(rn, offset), cond); |
546 str(rd2, Address(rn, offset + kWordSize), cond); | 546 str(rd2, Address(rn, offset + kWordSize), cond); |
547 } else { | 547 } else { |
548 EmitMemOpAddressMode3(cond, B7 | B6 | B5 | B4, rd, Address(rn, offset)); | 548 EmitMemOpAddressMode3(cond, B7 | B6 | B5 | B4, rd, Address(rn, offset)); |
549 } | 549 } |
550 } | 550 } |
551 | 551 |
552 | 552 #if 0 |
| 553 // Folded into ARM32::AssemblerARM32::popList(), since it is its only |
| 554 // use (and doesn't implement ARM STM instruction). |
553 void Assembler::ldm(BlockAddressMode am, Register base, RegList regs, | 555 void Assembler::ldm(BlockAddressMode am, Register base, RegList regs, |
554 Condition cond) { | 556 Condition cond) { |
555 ASSERT(regs != 0); | 557 ASSERT(regs != 0); |
556 EmitMultiMemOp(cond, am, true, base, regs); | 558 EmitMultiMemOp(cond, am, true, base, regs); |
557 } | 559 } |
558 | 560 |
559 | |
560 #if 0 | |
561 // Folded into ARM32::AssemblerARM32::pushList(), since it is its only | 561 // Folded into ARM32::AssemblerARM32::pushList(), since it is its only |
562 // use (and doesn't implement ARM STM instruction). | 562 // use (and doesn't implement ARM STM instruction). |
563 void Assembler::stm(BlockAddressMode am, Register base, RegList regs, | 563 void Assembler::stm(BlockAddressMode am, Register base, RegList regs, |
564 Condition cond) { | 564 Condition cond) { |
565 ASSERT(regs != 0); | 565 ASSERT(regs != 0); |
566 EmitMultiMemOp(cond, am, false, base, regs); | 566 EmitMultiMemOp(cond, am, false, base, regs); |
567 } | 567 } |
568 #endif | 568 #endif |
569 | 569 |
570 | 570 |
(...skipping 1990 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2561 bool is_load, intptr_t cid, int64_t offset) { | 2561 bool is_load, intptr_t cid, int64_t offset) { |
2562 int32_t offset_mask = 0; | 2562 int32_t offset_mask = 0; |
2563 if (is_load) { | 2563 if (is_load) { |
2564 return CanHoldLoadOffset(OperandSizeFor(cid), offset, &offset_mask); | 2564 return CanHoldLoadOffset(OperandSizeFor(cid), offset, &offset_mask); |
2565 } else { | 2565 } else { |
2566 return CanHoldStoreOffset(OperandSizeFor(cid), offset, &offset_mask); | 2566 return CanHoldStoreOffset(OperandSizeFor(cid), offset, &offset_mask); |
2567 } | 2567 } |
2568 } | 2568 } |
2569 | 2569 |
2570 #if 0 | 2570 #if 0 |
2571 // Moved to ARM32::AssemblerARM32::push(); | 2571 // Moved to ARM32::AssemblerARM32::push(). |
2572 void Assembler::Push(Register rd, Condition cond) { | 2572 void Assembler::Push(Register rd, Condition cond) { |
2573 str(rd, Address(SP, -kWordSize, Address::PreIndex), cond); | 2573 str(rd, Address(SP, -kWordSize, Address::PreIndex), cond); |
2574 } | 2574 } |
2575 #endif | |
2576 | 2575 |
| 2576 // Moved to ARM32::AssemblerARM32::pop(). |
2577 void Assembler::Pop(Register rd, Condition cond) { | 2577 void Assembler::Pop(Register rd, Condition cond) { |
2578 ldr(rd, Address(SP, kWordSize, Address::PostIndex), cond); | 2578 ldr(rd, Address(SP, kWordSize, Address::PostIndex), cond); |
2579 } | 2579 } |
2580 | 2580 |
2581 #if 0 | 2581 // Moved to ARM32::AssemblerARM32::pushList(). |
2582 // Moved to ARM32::AssemblerARM32::pushList(); | |
2583 void Assembler::PushList(RegList regs, Condition cond) { | 2582 void Assembler::PushList(RegList regs, Condition cond) { |
2584 stm(DB_W, SP, regs, cond); | 2583 stm(DB_W, SP, regs, cond); |
2585 } | 2584 } |
2586 #endif | |
2587 | 2585 |
| 2586 // Moved to ARM32::AssemblerARM32::popList(). |
2588 void Assembler::PopList(RegList regs, Condition cond) { | 2587 void Assembler::PopList(RegList regs, Condition cond) { |
2589 ldm(IA_W, SP, regs, cond); | 2588 ldm(IA_W, SP, regs, cond); |
2590 } | 2589 } |
2591 | 2590 #endif |
2592 | 2591 |
2593 void Assembler::MoveRegister(Register rd, Register rm, Condition cond) { | 2592 void Assembler::MoveRegister(Register rd, Register rm, Condition cond) { |
2594 if (rd != rm) { | 2593 if (rd != rm) { |
2595 mov(rd, Operand(rm), cond); | 2594 mov(rd, Operand(rm), cond); |
2596 } | 2595 } |
2597 } | 2596 } |
2598 | 2597 |
2599 | 2598 |
2600 void Assembler::Lsl(Register rd, Register rm, const Operand& shift_imm, | 2599 void Assembler::Lsl(Register rd, Register rm, const Operand& shift_imm, |
2601 Condition cond) { | 2600 Condition cond) { |
(...skipping 1089 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3691 | 3690 |
3692 | 3691 |
3693 const char* Assembler::FpuRegisterName(FpuRegister reg) { | 3692 const char* Assembler::FpuRegisterName(FpuRegister reg) { |
3694 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters)); | 3693 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters)); |
3695 return fpu_reg_names[reg]; | 3694 return fpu_reg_names[reg]; |
3696 } | 3695 } |
3697 | 3696 |
3698 } // namespace dart | 3697 } // namespace dart |
3699 | 3698 |
3700 #endif // defined TARGET_ARCH_ARM | 3699 #endif // defined TARGET_ARCH_ARM |
OLD | NEW |