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

Side by Side Diff: src/x64/lithium-codegen-x64.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/x64/ic-x64.cc ('k') | src/x64/lithium-x64.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_X64 7 #if V8_TARGET_ARCH_X64
8 8
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 2831 matching lines...) Expand 10 before | Expand all | Expand 10 after
2842 __ LoadGlobalCell(result, instr->hydrogen()->cell().handle()); 2842 __ LoadGlobalCell(result, instr->hydrogen()->cell().handle());
2843 if (instr->hydrogen()->RequiresHoleCheck()) { 2843 if (instr->hydrogen()->RequiresHoleCheck()) {
2844 __ CompareRoot(result, Heap::kTheHoleValueRootIndex); 2844 __ CompareRoot(result, Heap::kTheHoleValueRootIndex);
2845 DeoptimizeIf(equal, instr->environment()); 2845 DeoptimizeIf(equal, instr->environment());
2846 } 2846 }
2847 } 2847 }
2848 2848
2849 2849
2850 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { 2850 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
2851 ASSERT(ToRegister(instr->context()).is(rsi)); 2851 ASSERT(ToRegister(instr->context()).is(rsi));
2852 ASSERT(ToRegister(instr->global_object()).is(rax)); 2852 ASSERT(ToRegister(instr->global_object()).is(LoadIC::ReceiverRegister()));
2853 ASSERT(ToRegister(instr->result()).is(rax)); 2853 ASSERT(ToRegister(instr->result()).is(rax));
2854 2854
2855 __ Move(rcx, instr->name()); 2855 __ Move(LoadIC::NameRegister(), instr->name());
2856 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL; 2856 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL;
2857 Handle<Code> ic = LoadIC::initialize_stub(isolate(), mode); 2857 Handle<Code> ic = LoadIC::initialize_stub(isolate(), mode);
2858 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2858 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2859 } 2859 }
2860 2860
2861 2861
2862 void LCodeGen::DoStoreGlobalCell(LStoreGlobalCell* instr) { 2862 void LCodeGen::DoStoreGlobalCell(LStoreGlobalCell* instr) {
2863 Register value = ToRegister(instr->value()); 2863 Register value = ToRegister(instr->value());
2864 Handle<Cell> cell_handle = instr->hydrogen()->cell().handle(); 2864 Handle<Cell> cell_handle = instr->hydrogen()->cell().handle();
2865 2865
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
2982 ASSERT(kSmiTagSize + kSmiShiftSize == 32); 2982 ASSERT(kSmiTagSize + kSmiShiftSize == 32);
2983 offset += kPointerSize / 2; 2983 offset += kPointerSize / 2;
2984 representation = Representation::Integer32(); 2984 representation = Representation::Integer32();
2985 } 2985 }
2986 __ Load(result, FieldOperand(object, offset), representation); 2986 __ Load(result, FieldOperand(object, offset), representation);
2987 } 2987 }
2988 2988
2989 2989
2990 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { 2990 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) {
2991 ASSERT(ToRegister(instr->context()).is(rsi)); 2991 ASSERT(ToRegister(instr->context()).is(rsi));
2992 ASSERT(ToRegister(instr->object()).is(rax)); 2992 ASSERT(ToRegister(instr->object()).is(LoadIC::ReceiverRegister()));
2993 ASSERT(ToRegister(instr->result()).is(rax)); 2993 ASSERT(ToRegister(instr->result()).is(rax));
2994 2994
2995 __ Move(rcx, instr->name()); 2995 __ Move(LoadIC::NameRegister(), instr->name());
2996 Handle<Code> ic = LoadIC::initialize_stub(isolate(), NOT_CONTEXTUAL); 2996 Handle<Code> ic = LoadIC::initialize_stub(isolate(), NOT_CONTEXTUAL);
2997 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2997 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2998 } 2998 }
2999 2999
3000 3000
3001 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { 3001 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) {
3002 Register function = ToRegister(instr->function()); 3002 Register function = ToRegister(instr->function());
3003 Register result = ToRegister(instr->result()); 3003 Register result = ToRegister(instr->result());
3004 3004
3005 // Check that the function really is a function. 3005 // Check that the function really is a function.
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
3279 return Operand(elements_pointer_reg, 3279 return Operand(elements_pointer_reg,
3280 ToRegister(key), 3280 ToRegister(key),
3281 scale_factor, 3281 scale_factor,
3282 offset); 3282 offset);
3283 } 3283 }
3284 } 3284 }
3285 3285
3286 3286
3287 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { 3287 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) {
3288 ASSERT(ToRegister(instr->context()).is(rsi)); 3288 ASSERT(ToRegister(instr->context()).is(rsi));
3289 ASSERT(ToRegister(instr->object()).is(rdx)); 3289 ASSERT(ToRegister(instr->object()).is(KeyedLoadIC::ReceiverRegister()));
3290 ASSERT(ToRegister(instr->key()).is(rax)); 3290 ASSERT(ToRegister(instr->key()).is(KeyedLoadIC::NameRegister()));
3291 3291
3292 Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize(); 3292 Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize();
3293 CallCode(ic, RelocInfo::CODE_TARGET, instr); 3293 CallCode(ic, RelocInfo::CODE_TARGET, instr);
3294 } 3294 }
3295 3295
3296 3296
3297 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { 3297 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) {
3298 Register result = ToRegister(instr->result()); 3298 Register result = ToRegister(instr->result());
3299 3299
3300 if (instr->hydrogen()->from_inlined()) { 3300 if (instr->hydrogen()->from_inlined()) {
(...skipping 2542 matching lines...) Expand 10 before | Expand all | Expand 10 after
5843 CallRuntime(Runtime::kHiddenPushBlockContext, 2, instr); 5843 CallRuntime(Runtime::kHiddenPushBlockContext, 2, instr);
5844 RecordSafepoint(Safepoint::kNoLazyDeopt); 5844 RecordSafepoint(Safepoint::kNoLazyDeopt);
5845 } 5845 }
5846 5846
5847 5847
5848 #undef __ 5848 #undef __
5849 5849
5850 } } // namespace v8::internal 5850 } } // namespace v8::internal
5851 5851
5852 #endif // V8_TARGET_ARCH_X64 5852 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/ic-x64.cc ('k') | src/x64/lithium-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698