OLD | NEW |
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 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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) { | 300 static void StoreIC_PushArgs(MacroAssembler* masm) { |
301 if (FLAG_vector_stores) { | 301 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(), |
302 __ Push(StoreDescriptor::ReceiverRegister(), | 302 StoreDescriptor::ValueRegister(), |
303 StoreDescriptor::NameRegister(), StoreDescriptor::ValueRegister(), | 303 VectorStoreICDescriptor::SlotRegister(), |
304 VectorStoreICDescriptor::SlotRegister(), | 304 VectorStoreICDescriptor::VectorRegister()); |
305 VectorStoreICDescriptor::VectorRegister()); | |
306 } else { | |
307 __ Push(StoreDescriptor::ReceiverRegister(), | |
308 StoreDescriptor::NameRegister(), StoreDescriptor::ValueRegister()); | |
309 } | |
310 } | 305 } |
311 | 306 |
312 | 307 |
313 void NamedStoreHandlerCompiler::GenerateSlow(MacroAssembler* masm) { | 308 void NamedStoreHandlerCompiler::GenerateSlow(MacroAssembler* masm) { |
314 StoreIC_PushArgs(masm); | 309 StoreIC_PushArgs(masm); |
315 | 310 |
316 // The slow case calls into the runtime to complete the store without causing | 311 // 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. | 312 // an IC miss that would otherwise cause a transition to the generic stub. |
318 __ TailCallRuntime(Runtime::kStoreIC_Slow, FLAG_vector_stores ? 5 : 3, 1); | 313 __ TailCallRuntime(Runtime::kStoreIC_Slow, 5, 1); |
319 } | 314 } |
320 | 315 |
321 | 316 |
322 void ElementHandlerCompiler::GenerateStoreSlow(MacroAssembler* masm) { | 317 void ElementHandlerCompiler::GenerateStoreSlow(MacroAssembler* masm) { |
323 StoreIC_PushArgs(masm); | 318 StoreIC_PushArgs(masm); |
324 | 319 |
325 // The slow case calls into the runtime to complete the store without causing | 320 // 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. | 321 // an IC miss that would otherwise cause a transition to the generic stub. |
327 __ TailCallRuntime(Runtime::kKeyedStoreIC_Slow, FLAG_vector_stores ? 5 : 3, | 322 __ TailCallRuntime(Runtime::kKeyedStoreIC_Slow, 5, 1); |
328 1); | |
329 } | 323 } |
330 | 324 |
331 | 325 |
332 #undef __ | 326 #undef __ |
333 #define __ ACCESS_MASM(masm()) | 327 #define __ ACCESS_MASM(masm()) |
334 | 328 |
335 | 329 |
336 void NamedStoreHandlerCompiler::GenerateRestoreName(Label* label, | 330 void NamedStoreHandlerCompiler::GenerateRestoreName(Label* label, |
337 Handle<Name> name) { | 331 Handle<Name> name) { |
338 if (!label->is_unused()) { | 332 if (!label->is_unused()) { |
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
781 // Return the generated code. | 775 // Return the generated code. |
782 return GetCode(kind(), Code::NORMAL, name); | 776 return GetCode(kind(), Code::NORMAL, name); |
783 } | 777 } |
784 | 778 |
785 | 779 |
786 #undef __ | 780 #undef __ |
787 } // namespace internal | 781 } // namespace internal |
788 } // namespace v8 | 782 } // namespace v8 |
789 | 783 |
790 #endif // V8_TARGET_ARCH_MIPS64 | 784 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |