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

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

Issue 403393008: MIPS: Introduce FLAG_vector_ics. (Closed) Base URL: https://v8.googlecode.com/svn/branches/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 | Annotate | Revision Log
« no previous file with comments | « src/mips/ic-mips.cc ('k') | src/mips/lithium-mips.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.7 1 // Copyright 2012 the V8 project authors. All rights reserved.7
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 2895 matching lines...) Expand 10 before | Expand all | Expand 10 after
2906 } 2906 }
2907 } 2907 }
2908 2908
2909 2909
2910 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { 2910 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
2911 ASSERT(ToRegister(instr->context()).is(cp)); 2911 ASSERT(ToRegister(instr->context()).is(cp));
2912 ASSERT(ToRegister(instr->global_object()).is(LoadIC::ReceiverRegister())); 2912 ASSERT(ToRegister(instr->global_object()).is(LoadIC::ReceiverRegister()));
2913 ASSERT(ToRegister(instr->result()).is(v0)); 2913 ASSERT(ToRegister(instr->result()).is(v0));
2914 2914
2915 __ li(LoadIC::NameRegister(), Operand(instr->name())); 2915 __ li(LoadIC::NameRegister(), Operand(instr->name()));
2916 if (FLAG_vector_ics) {
2917 Register vector = ToRegister(instr->temp_vector());
2918 ASSERT(vector.is(LoadIC::VectorRegister()));
2919 __ li(vector, instr->hydrogen()->feedback_vector());
2920 // No need to allocate this register.
2921 ASSERT(LoadIC::SlotRegister().is(a0));
2922 __ li(LoadIC::SlotRegister(),
2923 Operand(Smi::FromInt(instr->hydrogen()->slot())));
2924 }
2916 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL; 2925 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL;
2917 Handle<Code> ic = LoadIC::initialize_stub(isolate(), mode); 2926 Handle<Code> ic = LoadIC::initialize_stub(isolate(), mode);
2918 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2927 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2919 } 2928 }
2920 2929
2921 2930
2922 void LCodeGen::DoStoreGlobalCell(LStoreGlobalCell* instr) { 2931 void LCodeGen::DoStoreGlobalCell(LStoreGlobalCell* instr) {
2923 Register value = ToRegister(instr->value()); 2932 Register value = ToRegister(instr->value());
2924 Register cell = scratch0(); 2933 Register cell = scratch0();
2925 2934
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
3031 } 3040 }
3032 3041
3033 3042
3034 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { 3043 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) {
3035 ASSERT(ToRegister(instr->context()).is(cp)); 3044 ASSERT(ToRegister(instr->context()).is(cp));
3036 ASSERT(ToRegister(instr->object()).is(LoadIC::ReceiverRegister())); 3045 ASSERT(ToRegister(instr->object()).is(LoadIC::ReceiverRegister()));
3037 ASSERT(ToRegister(instr->result()).is(v0)); 3046 ASSERT(ToRegister(instr->result()).is(v0));
3038 3047
3039 // Name is always in a2. 3048 // Name is always in a2.
3040 __ li(LoadIC::NameRegister(), Operand(instr->name())); 3049 __ li(LoadIC::NameRegister(), Operand(instr->name()));
3050 if (FLAG_vector_ics) {
3051 Register vector = ToRegister(instr->temp_vector());
3052 ASSERT(vector.is(LoadIC::VectorRegister()));
3053 __ li(vector, instr->hydrogen()->feedback_vector());
3054 // No need to allocate this register.
3055 ASSERT(LoadIC::SlotRegister().is(a0));
3056 __ li(LoadIC::SlotRegister(),
3057 Operand(Smi::FromInt(instr->hydrogen()->slot())));
3058 }
3041 Handle<Code> ic = LoadIC::initialize_stub(isolate(), NOT_CONTEXTUAL); 3059 Handle<Code> ic = LoadIC::initialize_stub(isolate(), NOT_CONTEXTUAL);
3042 CallCode(ic, RelocInfo::CODE_TARGET, instr); 3060 CallCode(ic, RelocInfo::CODE_TARGET, instr);
3043 } 3061 }
3044 3062
3045 3063
3046 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { 3064 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) {
3047 Register scratch = scratch0(); 3065 Register scratch = scratch0();
3048 Register function = ToRegister(instr->function()); 3066 Register function = ToRegister(instr->function());
3049 Register result = ToRegister(instr->result()); 3067 Register result = ToRegister(instr->result());
3050 3068
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
3352 return MemOperand(scratch0(), base_offset); 3370 return MemOperand(scratch0(), base_offset);
3353 } 3371 }
3354 } 3372 }
3355 3373
3356 3374
3357 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { 3375 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) {
3358 ASSERT(ToRegister(instr->context()).is(cp)); 3376 ASSERT(ToRegister(instr->context()).is(cp));
3359 ASSERT(ToRegister(instr->object()).is(LoadIC::ReceiverRegister())); 3377 ASSERT(ToRegister(instr->object()).is(LoadIC::ReceiverRegister()));
3360 ASSERT(ToRegister(instr->key()).is(LoadIC::NameRegister())); 3378 ASSERT(ToRegister(instr->key()).is(LoadIC::NameRegister()));
3361 3379
3380 if (FLAG_vector_ics) {
3381 Register vector = ToRegister(instr->temp_vector());
3382 ASSERT(vector.is(LoadIC::VectorRegister()));
3383 __ li(vector, instr->hydrogen()->feedback_vector());
3384 // No need to allocate this register.
3385 ASSERT(LoadIC::SlotRegister().is(a0));
3386 __ li(LoadIC::SlotRegister(),
3387 Operand(Smi::FromInt(instr->hydrogen()->slot())));
3388 }
3389
3362 Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize(); 3390 Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize();
3363 CallCode(ic, RelocInfo::CODE_TARGET, instr); 3391 CallCode(ic, RelocInfo::CODE_TARGET, instr);
3364 } 3392 }
3365 3393
3366 3394
3367 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { 3395 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) {
3368 Register scratch = scratch0(); 3396 Register scratch = scratch0();
3369 Register temp = scratch1(); 3397 Register temp = scratch1();
3370 Register result = ToRegister(instr->result()); 3398 Register result = ToRegister(instr->result());
3371 3399
(...skipping 2531 matching lines...) Expand 10 before | Expand all | Expand 10 after
5903 __ li(at, scope_info); 5931 __ li(at, scope_info);
5904 __ Push(at, ToRegister(instr->function())); 5932 __ Push(at, ToRegister(instr->function()));
5905 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5933 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5906 RecordSafepoint(Safepoint::kNoLazyDeopt); 5934 RecordSafepoint(Safepoint::kNoLazyDeopt);
5907 } 5935 }
5908 5936
5909 5937
5910 #undef __ 5938 #undef __
5911 5939
5912 } } // namespace v8::internal 5940 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mips/ic-mips.cc ('k') | src/mips/lithium-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698