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_MIPS_H_ | 5 #ifndef VM_ASSEMBLER_MIPS_H_ |
6 #define VM_ASSEMBLER_MIPS_H_ | 6 #define VM_ASSEMBLER_MIPS_H_ |
7 | 7 |
8 #ifndef VM_ASSEMBLER_H_ | 8 #ifndef VM_ASSEMBLER_H_ |
9 #error Do not include assembler_mips.h directly; use assembler.h instead. | 9 #error Do not include assembler_mips.h directly; use assembler.h instead. |
10 #endif | 10 #endif |
(...skipping 778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
789 } | 789 } |
790 | 790 |
791 void Branch(const ExternalLabel* label) { | 791 void Branch(const ExternalLabel* label) { |
792 LoadImmediate(TMP, label->address()); | 792 LoadImmediate(TMP, label->address()); |
793 jr(TMP); | 793 jr(TMP); |
794 } | 794 } |
795 | 795 |
796 void BranchPatchable(const ExternalLabel* label) { | 796 void BranchPatchable(const ExternalLabel* label) { |
797 const uint16_t low = Utils::Low16Bits(label->address()); | 797 const uint16_t low = Utils::Low16Bits(label->address()); |
798 const uint16_t high = Utils::High16Bits(label->address()); | 798 const uint16_t high = Utils::High16Bits(label->address()); |
799 lui(TMP, Immediate(high)); | 799 lui(T9, Immediate(high)); |
800 ori(TMP, TMP, Immediate(low)); | 800 ori(T9, T9, Immediate(low)); |
801 jr(TMP); | 801 jr(T9); |
802 delay_slot_available_ = false; // CodePatcher expects a nop. | 802 delay_slot_available_ = false; // CodePatcher expects a nop. |
803 } | 803 } |
804 | 804 |
805 void BranchLink(const ExternalLabel* label) { | 805 void BranchLink(const ExternalLabel* label) { |
806 LoadImmediate(TMP, label->address()); | 806 LoadImmediate(T9, label->address()); |
807 jalr(TMP); | 807 jalr(T9); |
808 } | 808 } |
809 | 809 |
810 void BranchLinkPatchable(const ExternalLabel* label) { | 810 void BranchLinkPatchable(const ExternalLabel* label) { |
811 const int32_t offset = | 811 const int32_t offset = |
812 Array::data_offset() + 4*AddExternalLabel(label) - kHeapObjectTag; | 812 Array::data_offset() + 4*AddExternalLabel(label) - kHeapObjectTag; |
813 LoadWordFromPoolOffset(TMP, offset); | 813 LoadWordFromPoolOffset(T9, offset); |
814 jalr(TMP); | 814 jalr(T9); |
815 delay_slot_available_ = false; // CodePatcher expects a nop. | 815 delay_slot_available_ = false; // CodePatcher expects a nop. |
816 } | 816 } |
817 | 817 |
818 void Drop(intptr_t stack_elements) { | 818 void Drop(intptr_t stack_elements) { |
819 ASSERT(stack_elements >= 0); | 819 ASSERT(stack_elements >= 0); |
820 if (stack_elements > 0) { | 820 if (stack_elements > 0) { |
821 addiu(SP, SP, Immediate(stack_elements * kWordSize)); | 821 addiu(SP, SP, Immediate(stack_elements * kWordSize)); |
822 } | 822 } |
823 } | 823 } |
824 | 824 |
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1302 Register value, | 1302 Register value, |
1303 Label* no_update); | 1303 Label* no_update); |
1304 | 1304 |
1305 DISALLOW_ALLOCATION(); | 1305 DISALLOW_ALLOCATION(); |
1306 DISALLOW_COPY_AND_ASSIGN(Assembler); | 1306 DISALLOW_COPY_AND_ASSIGN(Assembler); |
1307 }; | 1307 }; |
1308 | 1308 |
1309 } // namespace dart | 1309 } // namespace dart |
1310 | 1310 |
1311 #endif // VM_ASSEMBLER_MIPS_H_ | 1311 #endif // VM_ASSEMBLER_MIPS_H_ |
OLD | NEW |