| 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 1098 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1109 } | 1109 } |
| 1110 | 1110 |
| 1111 void SmiTag(Register reg) { | 1111 void SmiTag(Register reg) { |
| 1112 sll(reg, reg, kSmiTagSize); | 1112 sll(reg, reg, kSmiTagSize); |
| 1113 } | 1113 } |
| 1114 | 1114 |
| 1115 void SmiUntag(Register reg) { | 1115 void SmiUntag(Register reg) { |
| 1116 sra(reg, reg, kSmiTagSize); | 1116 sra(reg, reg, kSmiTagSize); |
| 1117 } | 1117 } |
| 1118 | 1118 |
| 1119 void SmiUntag(Register dst, Register src) { |
| 1120 sra(dst, src, kSmiTagSize); |
| 1121 } |
| 1122 |
| 1119 void LoadFromOffset(Register reg, Register base, int32_t offset) { | 1123 void LoadFromOffset(Register reg, Register base, int32_t offset) { |
| 1120 ASSERT(!in_delay_slot_); | 1124 ASSERT(!in_delay_slot_); |
| 1121 if (Utils::IsInt(kImmBits, offset)) { | 1125 if (Utils::IsInt(kImmBits, offset)) { |
| 1122 lw(reg, Address(base, offset)); | 1126 lw(reg, Address(base, offset)); |
| 1123 } else { | 1127 } else { |
| 1124 LoadImmediate(TMP, offset); | 1128 LoadImmediate(TMP, offset); |
| 1125 addu(TMP, base, TMP); | 1129 addu(TMP, base, TMP); |
| 1126 lw(reg, Address(TMP, 0)); | 1130 lw(reg, Address(TMP, 0)); |
| 1127 } | 1131 } |
| 1128 } | 1132 } |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1339 Register value, | 1343 Register value, |
| 1340 Label* no_update); | 1344 Label* no_update); |
| 1341 | 1345 |
| 1342 DISALLOW_ALLOCATION(); | 1346 DISALLOW_ALLOCATION(); |
| 1343 DISALLOW_COPY_AND_ASSIGN(Assembler); | 1347 DISALLOW_COPY_AND_ASSIGN(Assembler); |
| 1344 }; | 1348 }; |
| 1345 | 1349 |
| 1346 } // namespace dart | 1350 } // namespace dart |
| 1347 | 1351 |
| 1348 #endif // VM_ASSEMBLER_MIPS_H_ | 1352 #endif // VM_ASSEMBLER_MIPS_H_ |
| OLD | NEW |