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

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

Issue 356713003: Use IC register definitions in platform files. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: nits. 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-arm64.cc ('k') | src/arm64/stub-cache-arm64.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 #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/hydrogen-osr.h" 10 #include "src/hydrogen-osr.h"
(...skipping 3381 matching lines...) Expand 10 before | Expand all | Expand 10 after
3392 __ Ldr(result, FieldMemOperand(result, Cell::kValueOffset)); 3392 __ Ldr(result, FieldMemOperand(result, Cell::kValueOffset));
3393 if (instr->hydrogen()->RequiresHoleCheck()) { 3393 if (instr->hydrogen()->RequiresHoleCheck()) {
3394 DeoptimizeIfRoot( 3394 DeoptimizeIfRoot(
3395 result, Heap::kTheHoleValueRootIndex, instr->environment()); 3395 result, Heap::kTheHoleValueRootIndex, instr->environment());
3396 } 3396 }
3397 } 3397 }
3398 3398
3399 3399
3400 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { 3400 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
3401 ASSERT(ToRegister(instr->context()).is(cp)); 3401 ASSERT(ToRegister(instr->context()).is(cp));
3402 ASSERT(ToRegister(instr->global_object()).Is(x0)); 3402 ASSERT(ToRegister(instr->global_object()).is(LoadIC::ReceiverRegister()));
3403 ASSERT(ToRegister(instr->result()).Is(x0)); 3403 ASSERT(ToRegister(instr->result()).Is(x0));
3404 __ Mov(x2, Operand(instr->name())); 3404 __ Mov(LoadIC::NameRegister(), Operand(instr->name()));
3405 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL; 3405 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL;
3406 Handle<Code> ic = LoadIC::initialize_stub(isolate(), mode); 3406 Handle<Code> ic = LoadIC::initialize_stub(isolate(), mode);
3407 CallCode(ic, RelocInfo::CODE_TARGET, instr); 3407 CallCode(ic, RelocInfo::CODE_TARGET, instr);
3408 } 3408 }
3409 3409
3410 3410
3411 MemOperand LCodeGen::PrepareKeyedExternalArrayOperand( 3411 MemOperand LCodeGen::PrepareKeyedExternalArrayOperand(
3412 Register key, 3412 Register key,
3413 Register base, 3413 Register base,
3414 Register scratch, 3414 Register scratch,
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
3646 } else { 3646 } else {
3647 DeoptimizeIfRoot(result, Heap::kTheHoleValueRootIndex, 3647 DeoptimizeIfRoot(result, Heap::kTheHoleValueRootIndex,
3648 instr->environment()); 3648 instr->environment());
3649 } 3649 }
3650 } 3650 }
3651 } 3651 }
3652 3652
3653 3653
3654 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { 3654 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) {
3655 ASSERT(ToRegister(instr->context()).is(cp)); 3655 ASSERT(ToRegister(instr->context()).is(cp));
3656 ASSERT(ToRegister(instr->object()).Is(x1)); 3656 ASSERT(ToRegister(instr->object()).is(KeyedLoadIC::ReceiverRegister()));
3657 ASSERT(ToRegister(instr->key()).Is(x0)); 3657 ASSERT(ToRegister(instr->key()).is(KeyedLoadIC::NameRegister()));
3658 3658
3659 Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize(); 3659 Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize();
3660 CallCode(ic, RelocInfo::CODE_TARGET, instr); 3660 CallCode(ic, RelocInfo::CODE_TARGET, instr);
3661 3661
3662 ASSERT(ToRegister(instr->result()).Is(x0)); 3662 ASSERT(ToRegister(instr->result()).Is(x0));
3663 } 3663 }
3664 3664
3665 3665
3666 void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) { 3666 void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) {
3667 HObjectAccess access = instr->hydrogen()->access(); 3667 HObjectAccess access = instr->hydrogen()->access();
(...skipping 29 matching lines...) Expand all
3697 __ Load(result, UntagSmiFieldMemOperand(source, offset), 3697 __ Load(result, UntagSmiFieldMemOperand(source, offset),
3698 Representation::Integer32()); 3698 Representation::Integer32());
3699 } else { 3699 } else {
3700 __ Load(result, FieldMemOperand(source, offset), access.representation()); 3700 __ Load(result, FieldMemOperand(source, offset), access.representation());
3701 } 3701 }
3702 } 3702 }
3703 3703
3704 3704
3705 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { 3705 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) {
3706 ASSERT(ToRegister(instr->context()).is(cp)); 3706 ASSERT(ToRegister(instr->context()).is(cp));
3707 // LoadIC expects x2 to hold the name, and x0 to hold the receiver. 3707 // LoadIC expects name and receiver in registers.
3708 ASSERT(ToRegister(instr->object()).is(LoadIC::ReceiverRegister()));
3708 ASSERT(ToRegister(instr->object()).is(x0)); 3709 ASSERT(ToRegister(instr->object()).is(x0));
3709 __ Mov(x2, Operand(instr->name())); 3710 __ Mov(LoadIC::NameRegister(), Operand(instr->name()));
3710 3711
3711 Handle<Code> ic = LoadIC::initialize_stub(isolate(), NOT_CONTEXTUAL); 3712 Handle<Code> ic = LoadIC::initialize_stub(isolate(), NOT_CONTEXTUAL);
3712 CallCode(ic, RelocInfo::CODE_TARGET, instr); 3713 CallCode(ic, RelocInfo::CODE_TARGET, instr);
3713 3714
3714 ASSERT(ToRegister(instr->result()).is(x0)); 3715 ASSERT(ToRegister(instr->result()).is(x0));
3715 } 3716 }
3716 3717
3717 3718
3718 void LCodeGen::DoLoadRoot(LLoadRoot* instr) { 3719 void LCodeGen::DoLoadRoot(LLoadRoot* instr) {
3719 Register result = ToRegister(instr->result()); 3720 Register result = ToRegister(instr->result());
(...skipping 2332 matching lines...) Expand 10 before | Expand all | Expand 10 after
6052 Handle<ScopeInfo> scope_info = instr->scope_info(); 6053 Handle<ScopeInfo> scope_info = instr->scope_info();
6053 __ Push(scope_info); 6054 __ Push(scope_info);
6054 __ Push(ToRegister(instr->function())); 6055 __ Push(ToRegister(instr->function()));
6055 CallRuntime(Runtime::kHiddenPushBlockContext, 2, instr); 6056 CallRuntime(Runtime::kHiddenPushBlockContext, 2, instr);
6056 RecordSafepoint(Safepoint::kNoLazyDeopt); 6057 RecordSafepoint(Safepoint::kNoLazyDeopt);
6057 } 6058 }
6058 6059
6059 6060
6060 6061
6061 } } // namespace v8::internal 6062 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm64/lithium-arm64.cc ('k') | src/arm64/stub-cache-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698