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

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

Powered by Google App Engine
This is Rietveld 408576698