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

Side by Side Diff: src/arm64/macro-assembler-arm64.cc

Issue 330053002: ARM, ARM64: Optimize array copy (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/arm64/lithium-codegen-arm64.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_ARM64 7 #if V8_TARGET_ARCH_ARM64
8 8
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 if (operand.NeedsRelocation(this)) { 427 if (operand.NeedsRelocation(this)) {
428 UseScratchRegisterScope temps(this); 428 UseScratchRegisterScope temps(this);
429 Register temp = temps.AcquireX(); 429 Register temp = temps.AcquireX();
430 Ldr(temp, operand.immediate()); 430 Ldr(temp, operand.immediate());
431 AddSubMacro(rd, rn, temp, S, op); 431 AddSubMacro(rd, rn, temp, S, op);
432 } else if ((operand.IsImmediate() && 432 } else if ((operand.IsImmediate() &&
433 !IsImmAddSub(operand.ImmediateValue())) || 433 !IsImmAddSub(operand.ImmediateValue())) ||
434 (rn.IsZero() && !operand.IsShiftedRegister()) || 434 (rn.IsZero() && !operand.IsShiftedRegister()) ||
435 (operand.IsShiftedRegister() && (operand.shift() == ROR))) { 435 (operand.IsShiftedRegister() && (operand.shift() == ROR))) {
436 UseScratchRegisterScope temps(this); 436 UseScratchRegisterScope temps(this);
437 Register temp = temps.AcquireSameSizeAs(rn); 437 // Use rd as a temp if possible.
438 Register temp =
439 (rd.Is(rn) || rd.IsSP() || rd.IsZero()) ?
440 temps.AcquireSameSizeAs(rn) : rd;
438 Mov(temp, operand); 441 Mov(temp, operand);
439 AddSub(rd, rn, temp, S, op); 442 AddSub(rd, rn, temp, S, op);
440 } else { 443 } else {
441 AddSub(rd, rn, operand, S, op); 444 AddSub(rd, rn, operand, S, op);
442 } 445 }
443 } 446 }
444 447
445 448
446 void MacroAssembler::AddSubWithCarryMacro(const Register& rd, 449 void MacroAssembler::AddSubWithCarryMacro(const Register& rd,
447 const Register& rn, 450 const Register& rn,
(...skipping 4846 matching lines...) Expand 10 before | Expand all | Expand 10 after
5294 } 5297 }
5295 } 5298 }
5296 5299
5297 5300
5298 #undef __ 5301 #undef __
5299 5302
5300 5303
5301 } } // namespace v8::internal 5304 } } // namespace v8::internal
5302 5305
5303 #endif // V8_TARGET_ARCH_ARM64 5306 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/arm64/lithium-codegen-arm64.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698