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

Side by Side Diff: src/arm64/lithium-codegen-arm64.cc

Issue 324093002: ARM/ARM64: Optimise HLoadNamedField and HStoreNamedField. Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Upload the correct patch (minor diff in hydrogen.h) 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
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 #include "src/arm64/lithium-codegen-arm64.h" 7 #include "src/arm64/lithium-codegen-arm64.h"
8 #include "src/arm64/lithium-gap-resolver-arm64.h" 8 #include "src/arm64/lithium-gap-resolver-arm64.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/stub-cache.h" 10 #include "src/stub-cache.h"
(...skipping 3665 matching lines...) Expand 10 before | Expand all | Expand 10 after
3676 FPRegister result = ToDoubleRegister(instr->result()); 3676 FPRegister result = ToDoubleRegister(instr->result());
3677 __ Ldr(result, FieldMemOperand(object, offset)); 3677 __ Ldr(result, FieldMemOperand(object, offset));
3678 return; 3678 return;
3679 } 3679 }
3680 3680
3681 Register result = ToRegister(instr->result()); 3681 Register result = ToRegister(instr->result());
3682 Register source; 3682 Register source;
3683 if (access.IsInobject()) { 3683 if (access.IsInobject()) {
3684 source = object; 3684 source = object;
3685 } else { 3685 } else {
3686 // Load the properties array, using result as a scratch register. 3686 if (instr->object_properties()) {
3687 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); 3687 source = ToRegister(instr->object_properties());
3688 source = result; 3688 } else {
3689 // Load the properties array, using result as a scratch register.
3690 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset));
3691 source = result;
3692 }
3689 } 3693 }
3690 3694
3691 if (access.representation().IsSmi() && 3695 if (access.representation().IsSmi() &&
3692 instr->hydrogen()->representation().IsInteger32()) { 3696 instr->hydrogen()->representation().IsInteger32()) {
3693 // Read int value directly from upper half of the smi. 3697 // Read int value directly from upper half of the smi.
3694 STATIC_ASSERT(kSmiValueSize == 32 && kSmiShift == 32 && kSmiTag == 0); 3698 STATIC_ASSERT(kSmiValueSize == 32 && kSmiShift == 32 && kSmiTag == 0);
3695 __ Load(result, UntagSmiFieldMemOperand(source, offset), 3699 __ Load(result, UntagSmiFieldMemOperand(source, offset),
3696 Representation::Integer32()); 3700 Representation::Integer32());
3697 } else { 3701 } else {
3698 __ Load(result, FieldMemOperand(source, offset), access.representation()); 3702 __ Load(result, FieldMemOperand(source, offset), access.representation());
(...skipping 1687 matching lines...) Expand 10 before | Expand all | Expand 10 after
5386 GetLinkRegisterState(), 5390 GetLinkRegisterState(),
5387 kSaveFPRegs); 5391 kSaveFPRegs);
5388 } 5392 }
5389 } 5393 }
5390 5394
5391 // Do the store. 5395 // Do the store.
5392 Register destination; 5396 Register destination;
5393 if (access.IsInobject()) { 5397 if (access.IsInobject()) {
5394 destination = object; 5398 destination = object;
5395 } else { 5399 } else {
5396 Register temp0 = ToRegister(instr->temp0()); 5400 if (instr->object_properties()) {
5397 __ Ldr(temp0, FieldMemOperand(object, JSObject::kPropertiesOffset)); 5401 destination = ToRegister(instr->object_properties());
5398 destination = temp0; 5402 } else {
5403 Register temp0 = ToRegister(instr->temp0());
5404 __ Ldr(temp0, FieldMemOperand(object, JSObject::kPropertiesOffset));
5405 destination = temp0;
5406 }
5399 } 5407 }
5400 5408
5401 if (representation.IsSmi() && 5409 if (representation.IsSmi() &&
5402 instr->hydrogen()->value()->representation().IsInteger32()) { 5410 instr->hydrogen()->value()->representation().IsInteger32()) {
5403 ASSERT(instr->hydrogen()->store_mode() == STORE_TO_INITIALIZED_ENTRY); 5411 ASSERT(instr->hydrogen()->store_mode() == STORE_TO_INITIALIZED_ENTRY);
5404 #ifdef DEBUG 5412 #ifdef DEBUG
5405 Register temp0 = ToRegister(instr->temp0()); 5413 Register temp0 = ToRegister(instr->temp0());
5406 __ Ldr(temp0, FieldMemOperand(destination, offset)); 5414 __ Ldr(temp0, FieldMemOperand(destination, offset));
5407 __ AssertSmi(temp0); 5415 __ AssertSmi(temp0);
5408 // If destination aliased temp0, restore it to the address calculated 5416 // If destination aliased temp0, restore it to the address calculated
(...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after
6048 Handle<ScopeInfo> scope_info = instr->scope_info(); 6056 Handle<ScopeInfo> scope_info = instr->scope_info();
6049 __ Push(scope_info); 6057 __ Push(scope_info);
6050 __ Push(ToRegister(instr->function())); 6058 __ Push(ToRegister(instr->function()));
6051 CallRuntime(Runtime::kHiddenPushBlockContext, 2, instr); 6059 CallRuntime(Runtime::kHiddenPushBlockContext, 2, instr);
6052 RecordSafepoint(Safepoint::kNoLazyDeopt); 6060 RecordSafepoint(Safepoint::kNoLazyDeopt);
6053 } 6061 }
6054 6062
6055 6063
6056 6064
6057 } } // namespace v8::internal 6065 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm64/lithium-arm64.cc ('k') | src/hydrogen.h » ('j') | src/hydrogen-instructions.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698