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

Unified Diff: src/ppc/macro-assembler-ppc.cc

Issue 1947233002: PPC: Handle large offsets in LoadPU/StorePU. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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/ppc/macro-assembler-ppc.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « src/ppc/macro-assembler-ppc.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698