| 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" | 5 #include "vm/globals.h" |
| 6 #if defined(TARGET_ARCH_ARM) | 6 #if defined(TARGET_ARCH_ARM) |
| 7 | 7 |
| 8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
| 9 #include "vm/simulator.h" | 9 #include "vm/simulator.h" |
| 10 #include "vm/runtime_entry.h" | 10 #include "vm/runtime_entry.h" |
| (...skipping 1537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1548 } | 1548 } |
| 1549 | 1549 |
| 1550 | 1550 |
| 1551 void Assembler::Lsl(Register rd, Register rm, uint32_t shift_imm, | 1551 void Assembler::Lsl(Register rd, Register rm, uint32_t shift_imm, |
| 1552 Condition cond) { | 1552 Condition cond) { |
| 1553 ASSERT(shift_imm != 0); // Do not use Lsl if no shift is wanted. | 1553 ASSERT(shift_imm != 0); // Do not use Lsl if no shift is wanted. |
| 1554 mov(rd, ShifterOperand(rm, LSL, shift_imm), cond); | 1554 mov(rd, ShifterOperand(rm, LSL, shift_imm), cond); |
| 1555 } | 1555 } |
| 1556 | 1556 |
| 1557 | 1557 |
| 1558 void Assembler::Lsl(Register rd, Register rm, Register rs, Condition cond) { |
| 1559 mov(rd, ShifterOperand(rm, LSL, rs), cond); |
| 1560 } |
| 1561 |
| 1562 |
| 1558 void Assembler::Lsr(Register rd, Register rm, uint32_t shift_imm, | 1563 void Assembler::Lsr(Register rd, Register rm, uint32_t shift_imm, |
| 1559 Condition cond) { | 1564 Condition cond) { |
| 1560 ASSERT(shift_imm != 0); // Do not use Lsr if no shift is wanted. | 1565 ASSERT(shift_imm != 0); // Do not use Lsr if no shift is wanted. |
| 1561 if (shift_imm == 32) shift_imm = 0; // Comply to UAL syntax. | 1566 if (shift_imm == 32) shift_imm = 0; // Comply to UAL syntax. |
| 1562 mov(rd, ShifterOperand(rm, LSR, shift_imm), cond); | 1567 mov(rd, ShifterOperand(rm, LSR, shift_imm), cond); |
| 1563 } | 1568 } |
| 1564 | 1569 |
| 1565 | 1570 |
| 1571 void Assembler::Lsr(Register rd, Register rm, Register rs, Condition cond) { |
| 1572 mov(rd, ShifterOperand(rm, LSR, rs), cond); |
| 1573 } |
| 1574 |
| 1575 |
| 1566 void Assembler::Asr(Register rd, Register rm, uint32_t shift_imm, | 1576 void Assembler::Asr(Register rd, Register rm, uint32_t shift_imm, |
| 1567 Condition cond) { | 1577 Condition cond) { |
| 1568 ASSERT(shift_imm != 0); // Do not use Asr if no shift is wanted. | 1578 ASSERT(shift_imm != 0); // Do not use Asr if no shift is wanted. |
| 1569 if (shift_imm == 32) shift_imm = 0; // Comply to UAL syntax. | 1579 if (shift_imm == 32) shift_imm = 0; // Comply to UAL syntax. |
| 1570 mov(rd, ShifterOperand(rm, ASR, shift_imm), cond); | 1580 mov(rd, ShifterOperand(rm, ASR, shift_imm), cond); |
| 1571 } | 1581 } |
| 1572 | 1582 |
| 1573 | 1583 |
| 1584 void Assembler::Asr(Register rd, Register rm, Register rs, Condition cond) { |
| 1585 mov(rd, ShifterOperand(rm, ASR, rs), cond); |
| 1586 } |
| 1587 |
| 1588 |
| 1574 void Assembler::Ror(Register rd, Register rm, uint32_t shift_imm, | 1589 void Assembler::Ror(Register rd, Register rm, uint32_t shift_imm, |
| 1575 Condition cond) { | 1590 Condition cond) { |
| 1576 ASSERT(shift_imm != 0); // Use Rrx instruction. | 1591 ASSERT(shift_imm != 0); // Use Rrx instruction. |
| 1577 mov(rd, ShifterOperand(rm, ROR, shift_imm), cond); | 1592 mov(rd, ShifterOperand(rm, ROR, shift_imm), cond); |
| 1578 } | 1593 } |
| 1579 | 1594 |
| 1580 | 1595 |
| 1596 void Assembler::Ror(Register rd, Register rm, Register rs, Condition cond) { |
| 1597 mov(rd, ShifterOperand(rm, ROR, rs), cond); |
| 1598 } |
| 1599 |
| 1600 |
| 1581 void Assembler::Rrx(Register rd, Register rm, Condition cond) { | 1601 void Assembler::Rrx(Register rd, Register rm, Condition cond) { |
| 1582 mov(rd, ShifterOperand(rm, ROR, 0), cond); | 1602 mov(rd, ShifterOperand(rm, ROR, 0), cond); |
| 1583 } | 1603 } |
| 1584 | 1604 |
| 1585 | 1605 |
| 1586 void Assembler::Branch(const ExternalLabel* label, Condition cond) { | 1606 void Assembler::Branch(const ExternalLabel* label, Condition cond) { |
| 1587 LoadImmediate(IP, label->address(), cond); // Address is never patched. | 1607 LoadImmediate(IP, label->address(), cond); // Address is never patched. |
| 1588 bx(IP, cond); | 1608 bx(IP, cond); |
| 1589 } | 1609 } |
| 1590 | 1610 |
| (...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2185 | 2205 |
| 2186 const char* Assembler::FpuRegisterName(FpuRegister reg) { | 2206 const char* Assembler::FpuRegisterName(FpuRegister reg) { |
| 2187 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters)); | 2207 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters)); |
| 2188 return fpu_reg_names[reg]; | 2208 return fpu_reg_names[reg]; |
| 2189 } | 2209 } |
| 2190 | 2210 |
| 2191 } // namespace dart | 2211 } // namespace dart |
| 2192 | 2212 |
| 2193 #endif // defined TARGET_ARCH_ARM | 2213 #endif // defined TARGET_ARCH_ARM |
| 2194 | 2214 |
| OLD | NEW |