Index: src/mips64/macro-assembler-mips64.h |
diff --git a/src/mips64/macro-assembler-mips64.h b/src/mips64/macro-assembler-mips64.h |
index 2de0ad27b5752594442081d0b7cf89933fb14654..5dfee07ad96f52d7ef45cda0324f19ce66894771 100644 |
--- a/src/mips64/macro-assembler-mips64.h |
+++ b/src/mips64/macro-assembler-mips64.h |
@@ -116,6 +116,13 @@ bool AreAliased(Register reg1, |
// ----------------------------------------------------------------------------- |
// Static helper functions. |
+#if defined(V8_TARGET_LITTLE_ENDIAN) |
+#define SmiWordOffset(offset) (offset + kPointerSize / 2) |
+#else |
+#define SmiWordOffset(offset) offset |
+#endif |
+ |
+ |
inline MemOperand ContextOperand(Register context, int index) { |
return MemOperand(context, Context::SlotOffset(index)); |
} |
@@ -133,9 +140,9 @@ inline MemOperand FieldMemOperand(Register object, int offset) { |
inline MemOperand UntagSmiMemOperand(Register rm, int offset) { |
- // Assumes that Smis are shifted by 32 bits and little endianness. |
+ // Assumes that Smis are shifted by 32 bits. |
STATIC_ASSERT(kSmiShift == 32); |
- return MemOperand(rm, offset + (kSmiShift / kBitsPerByte)); |
+ return MemOperand(rm, SmiWordOffset(offset)); |
} |
@@ -682,6 +689,9 @@ class MacroAssembler: public Assembler { |
void Uld(Register rd, const MemOperand& rs, Register scratch = at); |
void Usd(Register rd, const MemOperand& rs, Register scratch = at); |
+ void LoadWordPair(Register rd, const MemOperand& rs, Register scratch = at); |
+ void StoreWordPair(Register rd, const MemOperand& rs, Register scratch = at); |
+ |
// Load int32 in the rd register. |
void li(Register rd, Operand j, LiFlags mode = OPTIMIZE_SIZE); |
inline void li(Register rd, int64_t j, LiFlags mode = OPTIMIZE_SIZE) { |