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

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

Issue 405343002: X87: Introduce FLAG_vector_ics. (Closed) Base URL: https://chromium.googlesource.com/external/v8.git@bleeding_edge
Patch Set: Created 6 years, 5 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
« no previous file with comments | « src/x87/ic-x87.cc ('k') | src/x87/lithium-x87.h » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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_X87 7 #if V8_TARGET_ARCH_X87
8 8
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 2953 matching lines...) Expand 10 before | Expand all | Expand 10 after
2964 } 2964 }
2965 } 2965 }
2966 2966
2967 2967
2968 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { 2968 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
2969 ASSERT(ToRegister(instr->context()).is(esi)); 2969 ASSERT(ToRegister(instr->context()).is(esi));
2970 ASSERT(ToRegister(instr->global_object()).is(LoadIC::ReceiverRegister())); 2970 ASSERT(ToRegister(instr->global_object()).is(LoadIC::ReceiverRegister()));
2971 ASSERT(ToRegister(instr->result()).is(eax)); 2971 ASSERT(ToRegister(instr->result()).is(eax));
2972 2972
2973 __ mov(LoadIC::NameRegister(), instr->name()); 2973 __ mov(LoadIC::NameRegister(), instr->name());
2974 if (FLAG_vector_ics) {
2975 Register vector = ToRegister(instr->temp_vector());
2976 ASSERT(vector.is(LoadIC::VectorRegister()));
2977 __ mov(vector, instr->hydrogen()->feedback_vector());
2978 // No need to allocate this register.
2979 ASSERT(LoadIC::SlotRegister().is(eax));
2980 __ mov(LoadIC::SlotRegister(),
2981 Immediate(Smi::FromInt(instr->hydrogen()->slot())));
2982 }
2974 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL; 2983 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL;
2975 Handle<Code> ic = LoadIC::initialize_stub(isolate(), mode); 2984 Handle<Code> ic = LoadIC::initialize_stub(isolate(), mode);
2976 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2985 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2977 } 2986 }
2978 2987
2979 2988
2980 void LCodeGen::DoStoreGlobalCell(LStoreGlobalCell* instr) { 2989 void LCodeGen::DoStoreGlobalCell(LStoreGlobalCell* instr) {
2981 Register value = ToRegister(instr->value()); 2990 Register value = ToRegister(instr->value());
2982 Handle<PropertyCell> cell_handle = instr->hydrogen()->cell().handle(); 2991 Handle<PropertyCell> cell_handle = instr->hydrogen()->cell().handle();
2983 2992
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
3096 } 3105 }
3097 } 3106 }
3098 3107
3099 3108
3100 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { 3109 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) {
3101 ASSERT(ToRegister(instr->context()).is(esi)); 3110 ASSERT(ToRegister(instr->context()).is(esi));
3102 ASSERT(ToRegister(instr->object()).is(LoadIC::ReceiverRegister())); 3111 ASSERT(ToRegister(instr->object()).is(LoadIC::ReceiverRegister()));
3103 ASSERT(ToRegister(instr->result()).is(eax)); 3112 ASSERT(ToRegister(instr->result()).is(eax));
3104 3113
3105 __ mov(LoadIC::NameRegister(), instr->name()); 3114 __ mov(LoadIC::NameRegister(), instr->name());
3115 if (FLAG_vector_ics) {
3116 Register vector = ToRegister(instr->temp_vector());
3117 ASSERT(vector.is(LoadIC::VectorRegister()));
3118 __ mov(vector, instr->hydrogen()->feedback_vector());
3119 // No need to allocate this register.
3120 ASSERT(LoadIC::SlotRegister().is(eax));
3121 __ mov(LoadIC::SlotRegister(),
3122 Immediate(Smi::FromInt(instr->hydrogen()->slot())));
3123 }
3106 Handle<Code> ic = LoadIC::initialize_stub(isolate(), NOT_CONTEXTUAL); 3124 Handle<Code> ic = LoadIC::initialize_stub(isolate(), NOT_CONTEXTUAL);
3107 CallCode(ic, RelocInfo::CODE_TARGET, instr); 3125 CallCode(ic, RelocInfo::CODE_TARGET, instr);
3108 } 3126 }
3109 3127
3110 3128
3111 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { 3129 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) {
3112 Register function = ToRegister(instr->function()); 3130 Register function = ToRegister(instr->function());
3113 Register temp = ToRegister(instr->temp()); 3131 Register temp = ToRegister(instr->temp());
3114 Register result = ToRegister(instr->result()); 3132 Register result = ToRegister(instr->result());
3115 3133
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
3333 base_offset); 3351 base_offset);
3334 } 3352 }
3335 } 3353 }
3336 3354
3337 3355
3338 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { 3356 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) {
3339 ASSERT(ToRegister(instr->context()).is(esi)); 3357 ASSERT(ToRegister(instr->context()).is(esi));
3340 ASSERT(ToRegister(instr->object()).is(LoadIC::ReceiverRegister())); 3358 ASSERT(ToRegister(instr->object()).is(LoadIC::ReceiverRegister()));
3341 ASSERT(ToRegister(instr->key()).is(LoadIC::NameRegister())); 3359 ASSERT(ToRegister(instr->key()).is(LoadIC::NameRegister()));
3342 3360
3361 if (FLAG_vector_ics) {
3362 Register vector = ToRegister(instr->temp_vector());
3363 ASSERT(vector.is(LoadIC::VectorRegister()));
3364 __ mov(vector, instr->hydrogen()->feedback_vector());
3365 // No need to allocate this register.
3366 ASSERT(LoadIC::SlotRegister().is(eax));
3367 __ mov(LoadIC::SlotRegister(),
3368 Immediate(Smi::FromInt(instr->hydrogen()->slot())));
3369 }
3370
3343 Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize(); 3371 Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize();
3344 CallCode(ic, RelocInfo::CODE_TARGET, instr); 3372 CallCode(ic, RelocInfo::CODE_TARGET, instr);
3345 } 3373 }
3346 3374
3347 3375
3348 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { 3376 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) {
3349 Register result = ToRegister(instr->result()); 3377 Register result = ToRegister(instr->result());
3350 3378
3351 if (instr->hydrogen()->from_inlined()) { 3379 if (instr->hydrogen()->from_inlined()) {
3352 __ lea(result, Operand(esp, -2 * kPointerSize)); 3380 __ lea(result, Operand(esp, -2 * kPointerSize));
(...skipping 2338 matching lines...) Expand 10 before | Expand all | Expand 10 after
5691 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5719 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5692 RecordSafepoint(Safepoint::kNoLazyDeopt); 5720 RecordSafepoint(Safepoint::kNoLazyDeopt);
5693 } 5721 }
5694 5722
5695 5723
5696 #undef __ 5724 #undef __
5697 5725
5698 } } // namespace v8::internal 5726 } } // namespace v8::internal
5699 5727
5700 #endif // V8_TARGET_ARCH_X87 5728 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/x87/ic-x87.cc ('k') | src/x87/lithium-x87.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698