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

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

Issue 1303053004: Revert of Vector ICs: platform support for vector-based stores. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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
313 void NamedStoreHandlerCompiler::GenerateSlow(MacroAssembler* masm) { 300 void NamedStoreHandlerCompiler::GenerateSlow(MacroAssembler* masm) {
314 StoreIC_PushArgs(masm); 301 // Push receiver, key and value for runtime call.
302 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(),
303 StoreDescriptor::ValueRegister());
315 304
316 // The slow case calls into the runtime to complete the store without causing 305 // 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. 306 // an IC miss that would otherwise cause a transition to the generic stub.
318 __ TailCallRuntime(Runtime::kStoreIC_Slow, FLAG_vector_stores ? 5 : 3, 1); 307 __ TailCallRuntime(Runtime::kStoreIC_Slow, 3, 1);
319 } 308 }
320 309
321 310
322 void ElementHandlerCompiler::GenerateStoreSlow(MacroAssembler* masm) { 311 void ElementHandlerCompiler::GenerateStoreSlow(MacroAssembler* masm) {
323 StoreIC_PushArgs(masm); 312 // Push receiver, key and value for runtime call.
313 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(),
314 StoreDescriptor::ValueRegister());
324 315
325 // 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
326 // 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.
327 __ TailCallRuntime(Runtime::kKeyedStoreIC_Slow, FLAG_vector_stores ? 5 : 3, 318 __ TailCallRuntime(Runtime::kKeyedStoreIC_Slow, 3, 1);
328 1);
329 } 319 }
330 320
331 321
332 #undef __ 322 #undef __
333 #define __ ACCESS_MASM(masm()) 323 #define __ ACCESS_MASM(masm())
334 324
335 325
336 void NamedStoreHandlerCompiler::GenerateRestoreName(Label* label, 326 void NamedStoreHandlerCompiler::GenerateRestoreName(Label* label,
337 Handle<Name> name) { 327 Handle<Name> name) {
338 if (!label->is_unused()) { 328 if (!label->is_unused()) {
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 __ bind(&success); 551 __ bind(&success);
562 } 552 }
563 } 553 }
564 554
565 555
566 void NamedStoreHandlerCompiler::FrontendFooter(Handle<Name> name, Label* miss) { 556 void NamedStoreHandlerCompiler::FrontendFooter(Handle<Name> name, Label* miss) {
567 if (!miss->is_unused()) { 557 if (!miss->is_unused()) {
568 Label success; 558 Label success;
569 __ Branch(&success); 559 __ Branch(&success);
570 GenerateRestoreName(miss, name); 560 GenerateRestoreName(miss, name);
571 if (IC::ICUseVector(kind())) PopVectorAndSlot();
572 TailCallBuiltin(masm(), MissBuiltin(kind())); 561 TailCallBuiltin(masm(), MissBuiltin(kind()));
573 __ bind(&success); 562 __ bind(&success);
574 } 563 }
575 } 564 }
576 565
577 566
578 void NamedLoadHandlerCompiler::GenerateLoadConstant(Handle<Object> value) { 567 void NamedLoadHandlerCompiler::GenerateLoadConstant(Handle<Object> value) {
579 // Return the constant value. 568 // Return the constant value.
580 __ li(v0, value); 569 __ li(v0, value);
581 __ Ret(); 570 __ Ret();
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
781 // Return the generated code. 770 // Return the generated code.
782 return GetCode(kind(), Code::NORMAL, name); 771 return GetCode(kind(), Code::NORMAL, name);
783 } 772 }
784 773
785 774
786 #undef __ 775 #undef __
787 } // namespace internal 776 } // namespace internal
788 } // namespace v8 777 } // namespace v8
789 778
790 #endif // V8_TARGET_ARCH_MIPS64 779 #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