Index: src/mips/macro-assembler-mips.cc |
diff --git a/src/mips/macro-assembler-mips.cc b/src/mips/macro-assembler-mips.cc |
index f751e59b005eb4c6a834dc744f567ffc4703e87f..7b85688a4d9cf3835900c063b77b48a1af3e7944 100644 |
--- a/src/mips/macro-assembler-mips.cc |
+++ b/src/mips/macro-assembler-mips.cc |
@@ -53,6 +53,38 @@ MacroAssembler::MacroAssembler(Isolate* arg_isolate, void* buffer, int size) |
} |
+void MacroAssembler::Load(Register dst, |
+ const MemOperand& src, |
+ Representation r) { |
+ ASSERT(!r.IsDouble()); |
+ if (r.IsInteger8()) { |
+ lb(dst, src); |
+ } else if (r.IsUInteger8()) { |
+ lbu(dst, src); |
+ } else if (r.IsInteger16()) { |
+ lh(dst, src); |
+ } else if (r.IsUInteger16()) { |
+ lhu(dst, src); |
+ } else { |
+ lw(dst, src); |
+ } |
+} |
+ |
+ |
+void MacroAssembler::Store(Register src, |
+ const MemOperand& dst, |
+ Representation r) { |
+ ASSERT(!r.IsDouble()); |
+ if (r.IsInteger8() || r.IsUInteger8()) { |
+ sb(src, dst); |
+ } else if (r.IsInteger16() || r.IsUInteger16()) { |
+ sh(src, dst); |
+ } else { |
+ sw(src, dst); |
+ } |
+} |
+ |
+ |
void MacroAssembler::LoadRoot(Register destination, |
Heap::RootListIndex index) { |
lw(destination, MemOperand(s6, index << kPointerSizeLog2)); |