Chromium Code Reviews| 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 #ifndef VM_ASSEMBLER_ARM_H_ | 5 #ifndef VM_ASSEMBLER_ARM_H_ |
| 6 #define VM_ASSEMBLER_ARM_H_ | 6 #define VM_ASSEMBLER_ARM_H_ |
| 7 | 7 |
| 8 #ifndef VM_ASSEMBLER_H_ | 8 #ifndef VM_ASSEMBLER_H_ |
| 9 #error Do not include assembler_arm.h directly; use assembler.h instead. | 9 #error Do not include assembler_arm.h directly; use assembler.h instead. |
| 10 #endif | 10 #endif |
| (...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 710 void MoveRegister(Register rd, Register rm, Condition cond = AL); | 710 void MoveRegister(Register rd, Register rm, Condition cond = AL); |
| 711 | 711 |
| 712 // Convenience shift instructions. Use mov instruction with shifter operand | 712 // Convenience shift instructions. Use mov instruction with shifter operand |
| 713 // for variants setting the status flags. | 713 // for variants setting the status flags. |
| 714 void Lsl(Register rd, Register rm, uint32_t shift_imm, Condition cond = AL); | 714 void Lsl(Register rd, Register rm, uint32_t shift_imm, Condition cond = AL); |
| 715 void Lsl(Register rd, Register rm, Register rs, Condition cond = AL); | 715 void Lsl(Register rd, Register rm, Register rs, Condition cond = AL); |
| 716 void Lsr(Register rd, Register rm, uint32_t shift_imm, Condition cond = AL); | 716 void Lsr(Register rd, Register rm, uint32_t shift_imm, Condition cond = AL); |
| 717 void Lsr(Register rd, Register rm, Register rs, Condition cond = AL); | 717 void Lsr(Register rd, Register rm, Register rs, Condition cond = AL); |
| 718 void Asr(Register rd, Register rm, uint32_t shift_imm, Condition cond = AL); | 718 void Asr(Register rd, Register rm, uint32_t shift_imm, Condition cond = AL); |
| 719 void Asr(Register rd, Register rm, Register rs, Condition cond = AL); | 719 void Asr(Register rd, Register rm, Register rs, Condition cond = AL); |
| 720 void AsrS(Register rd, Register rm, uint32_t shift_imm, Condition cond = AL); | |
|
zra
2014/09/10 23:17:22
It looks like we've been using a little s, i.e. As
Vyacheslav Egorov (Google)
2014/09/11 11:49:16
Done.
| |
| 720 void Ror(Register rd, Register rm, uint32_t shift_imm, Condition cond = AL); | 721 void Ror(Register rd, Register rm, uint32_t shift_imm, Condition cond = AL); |
| 721 void Ror(Register rd, Register rm, Register rs, Condition cond = AL); | 722 void Ror(Register rd, Register rm, Register rs, Condition cond = AL); |
| 722 void Rrx(Register rd, Register rm, Condition cond = AL); | 723 void Rrx(Register rd, Register rm, Condition cond = AL); |
| 723 | 724 |
| 724 // Fill rd with the sign of rm. | 725 // Fill rd with the sign of rm. |
| 725 void SignFill(Register rd, Register rm, Condition cond = AL); | 726 void SignFill(Register rd, Register rm, Condition cond = AL); |
| 726 | 727 |
| 727 void Vreciprocalqs(QRegister qd, QRegister qm); | 728 void Vreciprocalqs(QRegister qd, QRegister qm); |
| 728 void VreciprocalSqrtqs(QRegister qd, QRegister qm); | 729 void VreciprocalSqrtqs(QRegister qd, QRegister qm); |
| 729 // If qm must be preserved, then provide a (non-QTMP) temporary. | 730 // If qm must be preserved, then provide a (non-QTMP) temporary. |
| 730 void Vsqrtqs(QRegister qd, QRegister qm, QRegister temp); | 731 void Vsqrtqs(QRegister qd, QRegister qm, QRegister temp); |
| 731 void Vdivqs(QRegister qd, QRegister qn, QRegister qm); | 732 void Vdivqs(QRegister qd, QRegister qn, QRegister qm); |
| 732 | 733 |
| 733 void SmiTag(Register reg, Condition cond = AL) { | 734 void SmiTag(Register reg, Condition cond = AL) { |
| 734 Lsl(reg, reg, kSmiTagSize, cond); | 735 Lsl(reg, reg, kSmiTagSize, cond); |
| 735 } | 736 } |
| 736 | 737 |
| 738 void SmiTag(Register dst, Register src, Condition cond = AL) { | |
| 739 Lsl(dst, src, kSmiTagSize, cond); | |
| 740 } | |
| 741 | |
| 737 void SmiUntag(Register reg, Condition cond = AL) { | 742 void SmiUntag(Register reg, Condition cond = AL) { |
| 738 Asr(reg, reg, kSmiTagSize, cond); | 743 Asr(reg, reg, kSmiTagSize, cond); |
| 739 } | 744 } |
| 740 | 745 |
| 741 void SmiUntag(Register dst, Register src, Condition cond = AL) { | 746 void SmiUntag(Register dst, Register src, Condition cond = AL) { |
| 742 Asr(dst, src, kSmiTagSize, cond); | 747 Asr(dst, src, kSmiTagSize, cond); |
| 743 } | 748 } |
| 744 | 749 |
| 750 void SmiUntag(Register dst, Register src, Label* ok) { | |
|
zra
2014/09/10 23:17:22
Maybe comment here about what the Label is for.
Vyacheslav Egorov (Google)
2014/09/11 11:49:16
Done.
| |
| 751 ASSERT(kSmiTagSize == 1); | |
| 752 AsrS(dst, src, kSmiTagSize); | |
| 753 b(ok, CC); | |
| 754 } | |
| 755 | |
| 745 // Function frame setup and tear down. | 756 // Function frame setup and tear down. |
| 746 void EnterFrame(RegList regs, intptr_t frame_space); | 757 void EnterFrame(RegList regs, intptr_t frame_space); |
| 747 void LeaveFrame(RegList regs); | 758 void LeaveFrame(RegList regs); |
| 748 void Ret(); | 759 void Ret(); |
| 749 void ReserveAlignedFrameSpace(intptr_t frame_space); | 760 void ReserveAlignedFrameSpace(intptr_t frame_space); |
| 750 | 761 |
| 751 // Create a frame for calling into runtime that preserves all volatile | 762 // Create a frame for calling into runtime that preserves all volatile |
| 752 // registers. Frame's SP is guaranteed to be correctly aligned and | 763 // registers. Frame's SP is guaranteed to be correctly aligned and |
| 753 // frame_space bytes are reserved under it. | 764 // frame_space bytes are reserved under it. |
| 754 void EnterCallRuntimeFrame(intptr_t frame_space); | 765 void EnterCallRuntimeFrame(intptr_t frame_space); |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 966 Register value, | 977 Register value, |
| 967 Label* no_update); | 978 Label* no_update); |
| 968 | 979 |
| 969 DISALLOW_ALLOCATION(); | 980 DISALLOW_ALLOCATION(); |
| 970 DISALLOW_COPY_AND_ASSIGN(Assembler); | 981 DISALLOW_COPY_AND_ASSIGN(Assembler); |
| 971 }; | 982 }; |
| 972 | 983 |
| 973 } // namespace dart | 984 } // namespace dart |
| 974 | 985 |
| 975 #endif // VM_ASSEMBLER_ARM_H_ | 986 #endif // VM_ASSEMBLER_ARM_H_ |
| OLD | NEW |