Index: runtime/vm/assembler_mips.h |
=================================================================== |
--- runtime/vm/assembler_mips.h (revision 24520) |
+++ runtime/vm/assembler_mips.h (working copy) |
@@ -995,6 +995,26 @@ |
sra(reg, reg, kSmiTagSize); |
} |
+ void LoadFromOffset(Register reg, Register base, int32_t offset) { |
+ if (Utils::IsInt(kImmBits, offset)) { |
+ lw(reg, Address(base, offset)); |
+ } else { |
+ LoadImmediate(TMP, offset); |
+ addu(TMP, base, TMP); |
+ lw(reg, Address(TMP, 0)); |
+ } |
+ } |
+ |
+ void StoreToOffset(Register reg, Register base, int32_t offset) { |
+ if (Utils::IsInt(kImmBits, offset)) { |
+ sw(reg, Address(base, offset)); |
+ } else { |
+ LoadImmediate(TMP, offset); |
+ addu(TMP, base, TMP); |
+ sw(reg, Address(TMP, 0)); |
+ } |
+ } |
+ |
void StoreDToOffset(DRegister reg, Register base, int32_t offset) { |
FRegister lo = static_cast<FRegister>(reg * 2); |
FRegister hi = static_cast<FRegister>(reg * 2 + 1); |