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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 56 void LinkTo(intptr_t position) { | 56 void LinkTo(intptr_t position) { |
| 57 ASSERT(!IsBound()); | 57 ASSERT(!IsBound()); |
| 58 position_ = position + kWordSize; | 58 position_ = position + kWordSize; |
| 59 ASSERT(IsLinked()); | 59 ASSERT(IsLinked()); |
| 60 } | 60 } |
| 61 | 61 |
| 62 friend class Assembler; | 62 friend class Assembler; |
| 63 DISALLOW_COPY_AND_ASSIGN(Label); | 63 DISALLOW_COPY_AND_ASSIGN(Label); |
| 64 }; | 64 }; |
| 65 | 65 |
| 66 | |
| 66 // Encodes Addressing Mode 1 - Data-processing operands. | 67 // Encodes Addressing Mode 1 - Data-processing operands. |
| 67 class ShifterOperand : public ValueObject { | 68 class ShifterOperand : public ValueObject { |
| 68 public: | 69 public: |
| 69 // Data-processing operands - Uninitialized. | 70 // Data-processing operands - Uninitialized. |
| 70 ShifterOperand() : type_(-1), encoding_(-1) { } | 71 ShifterOperand() : type_(-1), encoding_(-1) { } |
| 71 | 72 |
| 72 // Data-processing operands - Copy constructor. | 73 // Data-processing operands - Copy constructor. |
| 73 ShifterOperand(const ShifterOperand& other) | 74 ShifterOperand(const ShifterOperand& other) |
| 74 : ValueObject(), type_(other.type_), encoding_(other.encoding_) { } | 75 : ValueObject(), type_(other.type_), encoding_(other.encoding_) { } |
| 75 | 76 |
| (...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 583 | 584 |
| 584 | 585 |
| 585 // Signed integer division of left by right. Checks to see if integer | 586 // Signed integer division of left by right. Checks to see if integer |
| 586 // division is supported. If not, uses the FPU for division with | 587 // division is supported. If not, uses the FPU for division with |
| 587 // temporary registers tmpl and tmpr. tmpl and tmpr must be different | 588 // temporary registers tmpl and tmpr. tmpl and tmpr must be different |
| 588 // registers. | 589 // registers. |
| 589 void IntegerDivide(Register result, Register left, Register right, | 590 void IntegerDivide(Register result, Register left, Register right, |
| 590 DRegister tmpl, DRegister tmpr); | 591 DRegister tmpl, DRegister tmpr); |
| 591 | 592 |
| 592 // Load and Store. May clobber IP. | 593 // Load and Store. May clobber IP. |
| 594 void LoadLargeImmediate(Register rd, int32_t value, Condition cond = AL); | |
|
regis
2014/03/06 17:32:11
The function LoadImmediate below is also able to l
zra
2014/03/07 19:00:17
Done.
| |
| 593 void LoadImmediate(Register rd, int32_t value, Condition cond = AL); | 595 void LoadImmediate(Register rd, int32_t value, Condition cond = AL); |
| 594 void LoadSImmediate(SRegister sd, float value, Condition cond = AL); | 596 void LoadSImmediate(SRegister sd, float value, Condition cond = AL); |
| 595 void LoadDImmediate(DRegister dd, double value, | 597 void LoadDImmediate(DRegister dd, double value, |
| 596 Register scratch, Condition cond = AL); | 598 Register scratch, Condition cond = AL); |
| 597 | 599 |
| 598 void MarkExceptionHandler(Label* label); | 600 void MarkExceptionHandler(Label* label); |
| 599 | 601 |
| 600 void Drop(intptr_t stack_elements); | 602 void Drop(intptr_t stack_elements); |
| 601 | 603 |
| 602 void LoadPoolPointer(); | 604 void LoadPoolPointer(); |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 748 private: | 750 private: |
| 749 AssemblerBuffer buffer_; // Contains position independent code. | 751 AssemblerBuffer buffer_; // Contains position independent code. |
| 750 GrowableObjectArray& object_pool_; // Objects and patchable jump targets. | 752 GrowableObjectArray& object_pool_; // Objects and patchable jump targets. |
| 751 int32_t prologue_offset_; | 753 int32_t prologue_offset_; |
| 752 | 754 |
| 753 bool use_far_branches_; | 755 bool use_far_branches_; |
| 754 | 756 |
| 755 int32_t AddObject(const Object& obj); | 757 int32_t AddObject(const Object& obj); |
| 756 int32_t AddExternalLabel(const ExternalLabel* label); | 758 int32_t AddExternalLabel(const ExternalLabel* label); |
| 757 | 759 |
| 760 void BindARMv6(Label* label); | |
| 761 void BindARMv7(Label* label); | |
| 762 | |
| 758 class CodeComment : public ZoneAllocated { | 763 class CodeComment : public ZoneAllocated { |
| 759 public: | 764 public: |
| 760 CodeComment(intptr_t pc_offset, const String& comment) | 765 CodeComment(intptr_t pc_offset, const String& comment) |
| 761 : pc_offset_(pc_offset), comment_(comment) { } | 766 : pc_offset_(pc_offset), comment_(comment) { } |
| 762 | 767 |
| 763 intptr_t pc_offset() const { return pc_offset_; } | 768 intptr_t pc_offset() const { return pc_offset_; } |
| 764 const String& comment() const { return comment_; } | 769 const String& comment() const { return comment_; } |
| 765 | 770 |
| 766 private: | 771 private: |
| 767 intptr_t pc_offset_; | 772 intptr_t pc_offset_; |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 880 Register value, | 885 Register value, |
| 881 Label* no_update); | 886 Label* no_update); |
| 882 | 887 |
| 883 DISALLOW_ALLOCATION(); | 888 DISALLOW_ALLOCATION(); |
| 884 DISALLOW_COPY_AND_ASSIGN(Assembler); | 889 DISALLOW_COPY_AND_ASSIGN(Assembler); |
| 885 }; | 890 }; |
| 886 | 891 |
| 887 } // namespace dart | 892 } // namespace dart |
| 888 | 893 |
| 889 #endif // VM_ASSEMBLER_ARM_H_ | 894 #endif // VM_ASSEMBLER_ARM_H_ |
| OLD | NEW |