Index: src/ppc/macro-assembler-ppc.cc |
diff --git a/src/ppc/macro-assembler-ppc.cc b/src/ppc/macro-assembler-ppc.cc |
index e519b599df07297d22ecc40531c550bfb835200d..0945f79dbdad648f7a8e711c5ee92d6712c58b1a 100644 |
--- a/src/ppc/macro-assembler-ppc.cc |
+++ b/src/ppc/macro-assembler-ppc.cc |
@@ -4208,11 +4208,7 @@ void MacroAssembler::LoadP(Register dst, const MemOperand& mem, |
/* cannot use d-form */ |
DCHECK(!scratch.is(no_reg)); |
mov(scratch, Operand(offset)); |
-#if V8_TARGET_ARCH_PPC64 |
- ldx(dst, MemOperand(mem.ra(), scratch)); |
-#else |
- lwzx(dst, MemOperand(mem.ra(), scratch)); |
-#endif |
+ LoadPX(dst, MemOperand(mem.ra(), scratch)); |
} else { |
#if V8_TARGET_ARCH_PPC64 |
int misaligned = (offset & 3); |
@@ -4231,9 +4227,7 @@ void MacroAssembler::LoadP(Register dst, const MemOperand& mem, |
} |
} |
- |
-// Store a "pointer" sized value to the memory location |
-void MacroAssembler::StoreP(Register src, const MemOperand& mem, |
+void MacroAssembler::LoadPU(Register dst, const MemOperand& mem, |
Register scratch) { |
int offset = mem.offset(); |
@@ -4241,11 +4235,26 @@ void MacroAssembler::StoreP(Register src, const MemOperand& mem, |
/* cannot use d-form */ |
DCHECK(!scratch.is(no_reg)); |
mov(scratch, Operand(offset)); |
+ LoadPUX(dst, MemOperand(mem.ra(), scratch)); |
+ } else { |
#if V8_TARGET_ARCH_PPC64 |
- stdx(src, MemOperand(mem.ra(), scratch)); |
+ ldu(dst, mem); |
#else |
- stwx(src, MemOperand(mem.ra(), scratch)); |
+ lwzu(dst, mem); |
#endif |
+ } |
+} |
+ |
+// Store a "pointer" sized value to the memory location |
+void MacroAssembler::StoreP(Register src, const MemOperand& mem, |
+ Register scratch) { |
+ int offset = mem.offset(); |
+ |
+ if (!is_int16(offset)) { |
+ /* cannot use d-form */ |
+ DCHECK(!scratch.is(no_reg)); |
+ mov(scratch, Operand(offset)); |
+ StorePX(src, MemOperand(mem.ra(), scratch)); |
} else { |
#if V8_TARGET_ARCH_PPC64 |
int misaligned = (offset & 3); |
@@ -4269,6 +4278,24 @@ void MacroAssembler::StoreP(Register src, const MemOperand& mem, |
} |
} |
+void MacroAssembler::StorePU(Register src, const MemOperand& mem, |
+ Register scratch) { |
+ int offset = mem.offset(); |
+ |
+ if (!is_int16(offset)) { |
+ /* cannot use d-form */ |
+ DCHECK(!scratch.is(no_reg)); |
+ mov(scratch, Operand(offset)); |
+ StorePUX(src, MemOperand(mem.ra(), scratch)); |
+ } else { |
+#if V8_TARGET_ARCH_PPC64 |
+ stdu(src, mem); |
+#else |
+ stwu(src, mem); |
+#endif |
+ } |
+} |
+ |
void MacroAssembler::LoadWordArith(Register dst, const MemOperand& mem, |
Register scratch) { |
int offset = mem.offset(); |