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

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

Issue 2242223002: PPC: Enable unaligned access and clean up the use of UNALIGNED_ACCESSES (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase over master Created 4 years, 4 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/constants-ppc.h ('k') | src/regexp/ppc/regexp-macro-assembler-ppc.h » ('j') | 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 9f808ff4c1f460ce6ab1ffcb98cecef8ed42aeca..4e39d967afdb7e67c256e6775af71ad5e067f6e6 100644
--- a/src/ppc/macro-assembler-ppc.cc
+++ b/src/ppc/macro-assembler-ppc.cc
@@ -3329,50 +3329,9 @@ void MacroAssembler::CopyBytes(Register src, Register dst, Register length,
LoadP(scratch, MemOperand(src));
addi(src, src, Operand(kPointerSize));
subi(length, length, Operand(kPointerSize));
- if (CpuFeatures::IsSupported(UNALIGNED_ACCESSES)) {
- // currently false for PPC - but possible future opt
- StoreP(scratch, MemOperand(dst));
- addi(dst, dst, Operand(kPointerSize));
- } else {
-#if V8_TARGET_LITTLE_ENDIAN
- stb(scratch, MemOperand(dst, 0));
- ShiftRightImm(scratch, scratch, Operand(8));
- stb(scratch, MemOperand(dst, 1));
- ShiftRightImm(scratch, scratch, Operand(8));
- stb(scratch, MemOperand(dst, 2));
- ShiftRightImm(scratch, scratch, Operand(8));
- stb(scratch, MemOperand(dst, 3));
-#if V8_TARGET_ARCH_PPC64
- ShiftRightImm(scratch, scratch, Operand(8));
- stb(scratch, MemOperand(dst, 4));
- ShiftRightImm(scratch, scratch, Operand(8));
- stb(scratch, MemOperand(dst, 5));
- ShiftRightImm(scratch, scratch, Operand(8));
- stb(scratch, MemOperand(dst, 6));
- ShiftRightImm(scratch, scratch, Operand(8));
- stb(scratch, MemOperand(dst, 7));
-#endif
-#else
-#if V8_TARGET_ARCH_PPC64
- stb(scratch, MemOperand(dst, 7));
- ShiftRightImm(scratch, scratch, Operand(8));
- stb(scratch, MemOperand(dst, 6));
- ShiftRightImm(scratch, scratch, Operand(8));
- stb(scratch, MemOperand(dst, 5));
- ShiftRightImm(scratch, scratch, Operand(8));
- stb(scratch, MemOperand(dst, 4));
- ShiftRightImm(scratch, scratch, Operand(8));
-#endif
- stb(scratch, MemOperand(dst, 3));
- ShiftRightImm(scratch, scratch, Operand(8));
- stb(scratch, MemOperand(dst, 2));
- ShiftRightImm(scratch, scratch, Operand(8));
- stb(scratch, MemOperand(dst, 1));
- ShiftRightImm(scratch, scratch, Operand(8));
- stb(scratch, MemOperand(dst, 0));
-#endif
- addi(dst, dst, Operand(kPointerSize));
- }
+
+ StoreP(scratch, MemOperand(dst));
+ addi(dst, dst, Operand(kPointerSize));
bdnz(&word_loop);
// Copy the last bytes if any left.
« no previous file with comments | « src/ppc/constants-ppc.h ('k') | src/regexp/ppc/regexp-macro-assembler-ppc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698