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 1145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1156 ASSERT(!in_delay_slot_); | 1156 ASSERT(!in_delay_slot_); |
1157 if (Utils::IsInt(kImmBits, offset)) { | 1157 if (Utils::IsInt(kImmBits, offset)) { |
1158 lw(reg, Address(base, offset)); | 1158 lw(reg, Address(base, offset)); |
1159 } else { | 1159 } else { |
1160 LoadImmediate(TMP, offset); | 1160 LoadImmediate(TMP, offset); |
1161 addu(TMP, base, TMP); | 1161 addu(TMP, base, TMP); |
1162 lw(reg, Address(TMP, 0)); | 1162 lw(reg, Address(TMP, 0)); |
1163 } | 1163 } |
1164 } | 1164 } |
1165 | 1165 |
| 1166 void LoadFieldFromOffset(Register reg, Register base, int32_t offset) { |
| 1167 LoadFromOffset(reg, base, offset - kHeapObjectTag); |
| 1168 } |
| 1169 |
1166 void StoreToOffset(Register reg, Register base, int32_t offset) { | 1170 void StoreToOffset(Register reg, Register base, int32_t offset) { |
1167 ASSERT(!in_delay_slot_); | 1171 ASSERT(!in_delay_slot_); |
1168 if (Utils::IsInt(kImmBits, offset)) { | 1172 if (Utils::IsInt(kImmBits, offset)) { |
1169 sw(reg, Address(base, offset)); | 1173 sw(reg, Address(base, offset)); |
1170 } else { | 1174 } else { |
1171 LoadImmediate(TMP, offset); | 1175 LoadImmediate(TMP, offset); |
1172 addu(TMP, base, TMP); | 1176 addu(TMP, base, TMP); |
1173 sw(reg, Address(TMP, 0)); | 1177 sw(reg, Address(TMP, 0)); |
1174 } | 1178 } |
1175 } | 1179 } |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1409 Register value, | 1413 Register value, |
1410 Label* no_update); | 1414 Label* no_update); |
1411 | 1415 |
1412 DISALLOW_ALLOCATION(); | 1416 DISALLOW_ALLOCATION(); |
1413 DISALLOW_COPY_AND_ASSIGN(Assembler); | 1417 DISALLOW_COPY_AND_ASSIGN(Assembler); |
1414 }; | 1418 }; |
1415 | 1419 |
1416 } // namespace dart | 1420 } // namespace dart |
1417 | 1421 |
1418 #endif // VM_ASSEMBLER_MIPS_H_ | 1422 #endif // VM_ASSEMBLER_MIPS_H_ |
OLD | NEW |