Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(856)

Unified Diff: src/mips64/macro-assembler-mips64.h

Issue 1334793004: MIPS64: Add big-endian support for mips64. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase ToT. Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/mips64/lithium-codegen-mips64.cc ('k') | src/mips64/macro-assembler-mips64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « src/mips64/lithium-codegen-mips64.cc ('k') | src/mips64/macro-assembler-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698