| 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 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 void BranchLink(const ExternalLabel* label); | 525 void BranchLink(const ExternalLabel* label); |
| 526 | 526 |
| 527 // Branch and link to an entry address. Call sequence can be patched. | 527 // Branch and link to an entry address. Call sequence can be patched. |
| 528 void BranchLinkPatchable(const ExternalLabel* label); | 528 void BranchLinkPatchable(const ExternalLabel* label); |
| 529 | 529 |
| 530 // Branch and link to entry after storing return address at ad. | 530 // Branch and link to entry after storing return address at ad. |
| 531 // Call sequence is never patched. | 531 // Call sequence is never patched. |
| 532 void BranchLinkStore(const ExternalLabel* label, Address ad); | 532 void BranchLinkStore(const ExternalLabel* label, Address ad); |
| 533 | 533 |
| 534 // Branch and link to [base + offset]. Call sequence is never patched. | 534 // Branch and link to [base + offset]. Call sequence is never patched. |
| 535 void BranchLinkOffset(Register base, int offset); | 535 void BranchLinkOffset(Register base, int32_t offset); |
| 536 | 536 |
| 537 // Add signed immediate value to rd. May clobber IP. | 537 // Add signed immediate value to rd. May clobber IP. |
| 538 void AddImmediate(Register rd, int32_t value, Condition cond = AL); | 538 void AddImmediate(Register rd, int32_t value, Condition cond = AL); |
| 539 void AddImmediate(Register rd, Register rn, int32_t value, | 539 void AddImmediate(Register rd, Register rn, int32_t value, |
| 540 Condition cond = AL); | 540 Condition cond = AL); |
| 541 void AddImmediateSetFlags(Register rd, Register rn, int32_t value, | 541 void AddImmediateSetFlags(Register rd, Register rn, int32_t value, |
| 542 Condition cond = AL); | 542 Condition cond = AL); |
| 543 void AddImmediateWithCarry(Register rd, Register rn, int32_t value, | 543 void AddImmediateWithCarry(Register rd, Register rn, int32_t value, |
| 544 Condition cond = AL); | 544 Condition cond = AL); |
| 545 | 545 |
| 546 // Compare rn with signed immediate value. May clobber IP. | 546 // Compare rn with signed immediate value. May clobber IP. |
| 547 void CompareImmediate(Register rn, int32_t value, Condition cond = AL); | 547 void CompareImmediate(Register rn, int32_t value, Condition cond = AL); |
| 548 | 548 |
| 549 // Load and Store. May clobber IP. | 549 // Load and Store. May clobber IP. |
| 550 void LoadImmediate(Register rd, int32_t value, Condition cond = AL); | 550 void LoadImmediate(Register rd, int32_t value, Condition cond = AL); |
| 551 void LoadSImmediate(SRegister sd, float value, Condition cond = AL); | 551 void LoadSImmediate(SRegister sd, float value, Condition cond = AL); |
| 552 void LoadDImmediate(DRegister dd, double value, | 552 void LoadDImmediate(DRegister dd, double value, |
| 553 Register scratch, Condition cond = AL); | 553 Register scratch, Condition cond = AL); |
| 554 void MarkExceptionHandler(Label* label); | 554 void MarkExceptionHandler(Label* label); |
| 555 void Drop(intptr_t stack_elements); | 555 void Drop(intptr_t stack_elements); |
| 556 void LoadObject(Register rd, const Object& object); | 556 void LoadObject(Register rd, const Object& object); |
| 557 void PushObject(const Object& object); | 557 void PushObject(const Object& object); |
| 558 void LoadWordFromPoolOffset(Register rd, int32_t offset); |
| 558 void LoadFromOffset(LoadOperandType type, | 559 void LoadFromOffset(LoadOperandType type, |
| 559 Register reg, | 560 Register reg, |
| 560 Register base, | 561 Register base, |
| 561 int32_t offset, | 562 int32_t offset, |
| 562 Condition cond = AL); | 563 Condition cond = AL); |
| 563 void StoreToOffset(StoreOperandType type, | 564 void StoreToOffset(StoreOperandType type, |
| 564 Register reg, | 565 Register reg, |
| 565 Register base, | 566 Register base, |
| 566 int32_t offset, | 567 int32_t offset, |
| 567 Condition cond = AL); | 568 Condition cond = AL); |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 674 GrowableArray<CodeComment*> comments_; | 675 GrowableArray<CodeComment*> comments_; |
| 675 | 676 |
| 676 void EmitType01(Condition cond, | 677 void EmitType01(Condition cond, |
| 677 int type, | 678 int type, |
| 678 Opcode opcode, | 679 Opcode opcode, |
| 679 int set_cc, | 680 int set_cc, |
| 680 Register rn, | 681 Register rn, |
| 681 Register rd, | 682 Register rd, |
| 682 ShifterOperand so); | 683 ShifterOperand so); |
| 683 | 684 |
| 684 void EmitType5(Condition cond, int offset, bool link); | 685 void EmitType5(Condition cond, int32_t offset, bool link); |
| 685 | 686 |
| 686 void EmitMemOp(Condition cond, | 687 void EmitMemOp(Condition cond, |
| 687 bool load, | 688 bool load, |
| 688 bool byte, | 689 bool byte, |
| 689 Register rd, | 690 Register rd, |
| 690 Address ad); | 691 Address ad); |
| 691 | 692 |
| 692 void EmitMemOpAddressMode3(Condition cond, | 693 void EmitMemOpAddressMode3(Condition cond, |
| 693 int32_t mode, | 694 int32_t mode, |
| 694 Register rd, | 695 Register rd, |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 755 int32_t opcode, | 756 int32_t opcode, |
| 756 SRegister sd, | 757 SRegister sd, |
| 757 DRegister dm); | 758 DRegister dm); |
| 758 | 759 |
| 759 void EmitVFPds(Condition cond, | 760 void EmitVFPds(Condition cond, |
| 760 int32_t opcode, | 761 int32_t opcode, |
| 761 DRegister dd, | 762 DRegister dd, |
| 762 SRegister sm); | 763 SRegister sm); |
| 763 | 764 |
| 764 void EmitBranch(Condition cond, Label* label, bool link); | 765 void EmitBranch(Condition cond, Label* label, bool link); |
| 765 static int32_t EncodeBranchOffset(int offset, int32_t inst); | 766 static int32_t EncodeBranchOffset(int32_t offset, int32_t inst); |
| 766 static int DecodeBranchOffset(int32_t inst); | 767 static int DecodeBranchOffset(int32_t inst); |
| 767 int32_t EncodeTstOffset(int offset, int32_t inst); | 768 int32_t EncodeTstOffset(int32_t offset, int32_t inst); |
| 768 int DecodeTstOffset(int32_t inst); | 769 int DecodeTstOffset(int32_t inst); |
| 769 | 770 |
| 770 // Returns whether or not the given register is used for passing parameters. | 771 // Returns whether or not the given register is used for passing parameters. |
| 771 static int RegisterCompare(const Register* reg1, const Register* reg2) { | 772 static int RegisterCompare(const Register* reg1, const Register* reg2) { |
| 772 return *reg1 - *reg2; | 773 return *reg1 - *reg2; |
| 773 } | 774 } |
| 774 | 775 |
| 775 DISALLOW_ALLOCATION(); | 776 DISALLOW_ALLOCATION(); |
| 776 DISALLOW_COPY_AND_ASSIGN(Assembler); | 777 DISALLOW_COPY_AND_ASSIGN(Assembler); |
| 777 }; | 778 }; |
| 778 | 779 |
| 779 } // namespace dart | 780 } // namespace dart |
| 780 | 781 |
| 781 #endif // VM_ASSEMBLER_ARM_H_ | 782 #endif // VM_ASSEMBLER_ARM_H_ |
| OLD | NEW |