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

Side by Side Diff: src/ic/mips/handler-compiler-mips.cc

Issue 1328603003: Vector ICs: platform support for vector-based stores. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: mips build fixes. Created 5 years, 3 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/ic/mips/access-compiler-mips.cc ('k') | src/ic/mips/ic-compiler-mips.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 #if V8_TARGET_ARCH_MIPS 5 #if V8_TARGET_ARCH_MIPS
6 6
7 #include "src/ic/call-optimization.h" 7 #include "src/ic/call-optimization.h"
8 #include "src/ic/handler-compiler.h" 8 #include "src/ic/handler-compiler.h"
9 #include "src/ic/ic.h" 9 #include "src/ic/ic.h"
10 #include "src/isolate-inl.h" 10 #include "src/isolate-inl.h"
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 ExternalReference::Type type = ExternalReference::DIRECT_API_CALL; 289 ExternalReference::Type type = ExternalReference::DIRECT_API_CALL;
290 ExternalReference ref = ExternalReference(&fun, type, masm->isolate()); 290 ExternalReference ref = ExternalReference(&fun, type, masm->isolate());
291 __ li(api_function_address, Operand(ref)); 291 __ li(api_function_address, Operand(ref));
292 292
293 // Jump to stub. 293 // Jump to stub.
294 CallApiAccessorStub stub(isolate, is_store, call_data_undefined); 294 CallApiAccessorStub stub(isolate, is_store, call_data_undefined);
295 __ TailCallStub(&stub); 295 __ TailCallStub(&stub);
296 } 296 }
297 297
298 298
299 static void StoreIC_PushArgs(MacroAssembler* masm) {
300 if (FLAG_vector_stores) {
301 __ Push(StoreDescriptor::ReceiverRegister(),
302 StoreDescriptor::NameRegister(), StoreDescriptor::ValueRegister(),
303 VectorStoreICDescriptor::SlotRegister(),
304 VectorStoreICDescriptor::VectorRegister());
305 } else {
306 __ Push(StoreDescriptor::ReceiverRegister(),
307 StoreDescriptor::NameRegister(), StoreDescriptor::ValueRegister());
308 }
309 }
310
311
299 void NamedStoreHandlerCompiler::GenerateSlow(MacroAssembler* masm) { 312 void NamedStoreHandlerCompiler::GenerateSlow(MacroAssembler* masm) {
300 // Push receiver, key and value for runtime call. 313 StoreIC_PushArgs(masm);
301 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(),
302 StoreDescriptor::ValueRegister());
303 314
304 // The slow case calls into the runtime to complete the store without causing 315 // The slow case calls into the runtime to complete the store without causing
305 // an IC miss that would otherwise cause a transition to the generic stub. 316 // an IC miss that would otherwise cause a transition to the generic stub.
306 __ TailCallRuntime(Runtime::kStoreIC_Slow, 3, 1); 317 __ TailCallRuntime(Runtime::kStoreIC_Slow, FLAG_vector_stores ? 5 : 3, 1);
307 } 318 }
308 319
309 320
310 void ElementHandlerCompiler::GenerateStoreSlow(MacroAssembler* masm) { 321 void ElementHandlerCompiler::GenerateStoreSlow(MacroAssembler* masm) {
311 // Push receiver, key and value for runtime call. 322 StoreIC_PushArgs(masm);
312 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(),
313 StoreDescriptor::ValueRegister());
314 323
315 // The slow case calls into the runtime to complete the store without causing 324 // The slow case calls into the runtime to complete the store without causing
316 // an IC miss that would otherwise cause a transition to the generic stub. 325 // an IC miss that would otherwise cause a transition to the generic stub.
317 __ TailCallRuntime(Runtime::kKeyedStoreIC_Slow, 3, 1); 326 __ TailCallRuntime(Runtime::kKeyedStoreIC_Slow, FLAG_vector_stores ? 5 : 3,
327 1);
318 } 328 }
319 329
320 330
321 #undef __ 331 #undef __
322 #define __ ACCESS_MASM(masm()) 332 #define __ ACCESS_MASM(masm())
323 333
324 334
325 void NamedStoreHandlerCompiler::GenerateRestoreName(Label* label, 335 void NamedStoreHandlerCompiler::GenerateRestoreName(Label* label,
326 Handle<Name> name) { 336 Handle<Name> name) {
327 if (!label->is_unused()) { 337 if (!label->is_unused()) {
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 __ bind(&success); 560 __ bind(&success);
551 } 561 }
552 } 562 }
553 563
554 564
555 void NamedStoreHandlerCompiler::FrontendFooter(Handle<Name> name, Label* miss) { 565 void NamedStoreHandlerCompiler::FrontendFooter(Handle<Name> name, Label* miss) {
556 if (!miss->is_unused()) { 566 if (!miss->is_unused()) {
557 Label success; 567 Label success;
558 __ Branch(&success); 568 __ Branch(&success);
559 GenerateRestoreName(miss, name); 569 GenerateRestoreName(miss, name);
570 if (IC::ICUseVector(kind())) PopVectorAndSlot();
560 TailCallBuiltin(masm(), MissBuiltin(kind())); 571 TailCallBuiltin(masm(), MissBuiltin(kind()));
561 __ bind(&success); 572 __ bind(&success);
562 } 573 }
563 } 574 }
564 575
565 576
566 void NamedLoadHandlerCompiler::GenerateLoadConstant(Handle<Object> value) { 577 void NamedLoadHandlerCompiler::GenerateLoadConstant(Handle<Object> value) {
567 // Return the constant value. 578 // Return the constant value.
568 __ li(v0, value); 579 __ li(v0, value);
569 __ Ret(); 580 __ Ret();
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
769 // Return the generated code. 780 // Return the generated code.
770 return GetCode(kind(), Code::NORMAL, name); 781 return GetCode(kind(), Code::NORMAL, name);
771 } 782 }
772 783
773 784
774 #undef __ 785 #undef __
775 } // namespace internal 786 } // namespace internal
776 } // namespace v8 787 } // namespace v8
777 788
778 #endif // V8_TARGET_ARCH_MIPS 789 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/ic/mips/access-compiler-mips.cc ('k') | src/ic/mips/ic-compiler-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698