OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/bootstrapper.h" | 7 #include "src/bootstrapper.h" |
8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
10 #include "src/ic/handler-compiler.h" | 10 #include "src/ic/handler-compiler.h" |
(...skipping 2691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2702 object_, | 2702 object_, |
2703 index_, | 2703 index_, |
2704 result_, | 2704 result_, |
2705 &call_runtime_); | 2705 &call_runtime_); |
2706 | 2706 |
2707 __ SmiTag(result_); | 2707 __ SmiTag(result_); |
2708 __ bind(&exit_); | 2708 __ bind(&exit_); |
2709 } | 2709 } |
2710 | 2710 |
2711 | 2711 |
2712 static void EmitLoadTypeFeedbackVector(MacroAssembler* masm, Register vector) { | |
2713 __ ld(vector, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); | |
2714 __ ld(vector, FieldMemOperand(vector, | |
2715 JSFunction::kSharedFunctionInfoOffset)); | |
2716 __ ld(vector, FieldMemOperand(vector, | |
2717 SharedFunctionInfo::kFeedbackVectorOffset)); | |
2718 } | |
2719 | |
2720 | |
2721 void CallICStub::HandleArrayCase(MacroAssembler* masm, Label* miss) { | 2712 void CallICStub::HandleArrayCase(MacroAssembler* masm, Label* miss) { |
2722 // a1 - function | 2713 // a1 - function |
2723 // a3 - slot id | 2714 // a3 - slot id |
2724 // a2 - vector | 2715 // a2 - vector |
2725 // a4 - allocation site (loaded from vector[slot]) | 2716 // a4 - allocation site (loaded from vector[slot]) |
2726 __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, at); | 2717 __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, at); |
2727 __ Branch(miss, ne, a1, Operand(at)); | 2718 __ Branch(miss, ne, a1, Operand(at)); |
2728 | 2719 |
2729 __ li(a0, Operand(arg_count())); | 2720 __ li(a0, Operand(arg_count())); |
2730 | 2721 |
(...skipping 1753 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4484 __ Daddu(a1, a1, Operand(1)); | 4475 __ Daddu(a1, a1, Operand(1)); |
4485 } | 4476 } |
4486 masm->LeaveFrame(StackFrame::STUB_FAILURE_TRAMPOLINE); | 4477 masm->LeaveFrame(StackFrame::STUB_FAILURE_TRAMPOLINE); |
4487 __ dsll(a1, a1, kPointerSizeLog2); | 4478 __ dsll(a1, a1, kPointerSizeLog2); |
4488 __ Ret(USE_DELAY_SLOT); | 4479 __ Ret(USE_DELAY_SLOT); |
4489 __ Daddu(sp, sp, a1); | 4480 __ Daddu(sp, sp, a1); |
4490 } | 4481 } |
4491 | 4482 |
4492 | 4483 |
4493 void LoadICTrampolineStub::Generate(MacroAssembler* masm) { | 4484 void LoadICTrampolineStub::Generate(MacroAssembler* masm) { |
4494 EmitLoadTypeFeedbackVector(masm, LoadWithVectorDescriptor::VectorRegister()); | 4485 __ EmitLoadTypeFeedbackVector(LoadWithVectorDescriptor::VectorRegister()); |
4495 LoadICStub stub(isolate(), state()); | 4486 LoadICStub stub(isolate(), state()); |
4496 stub.GenerateForTrampoline(masm); | 4487 stub.GenerateForTrampoline(masm); |
4497 } | 4488 } |
4498 | 4489 |
4499 | 4490 |
4500 void KeyedLoadICTrampolineStub::Generate(MacroAssembler* masm) { | 4491 void KeyedLoadICTrampolineStub::Generate(MacroAssembler* masm) { |
4501 EmitLoadTypeFeedbackVector(masm, LoadWithVectorDescriptor::VectorRegister()); | 4492 __ EmitLoadTypeFeedbackVector(LoadWithVectorDescriptor::VectorRegister()); |
4502 KeyedLoadICStub stub(isolate(), state()); | 4493 KeyedLoadICStub stub(isolate(), state()); |
4503 stub.GenerateForTrampoline(masm); | 4494 stub.GenerateForTrampoline(masm); |
4504 } | 4495 } |
4505 | 4496 |
4506 | 4497 |
4507 void CallICTrampolineStub::Generate(MacroAssembler* masm) { | 4498 void CallICTrampolineStub::Generate(MacroAssembler* masm) { |
4508 EmitLoadTypeFeedbackVector(masm, a2); | 4499 __ EmitLoadTypeFeedbackVector(a2); |
4509 CallICStub stub(isolate(), state()); | 4500 CallICStub stub(isolate(), state()); |
4510 __ Jump(stub.GetCode(), RelocInfo::CODE_TARGET); | 4501 __ Jump(stub.GetCode(), RelocInfo::CODE_TARGET); |
4511 } | 4502 } |
4512 | 4503 |
4513 | 4504 |
4514 void LoadICStub::Generate(MacroAssembler* masm) { GenerateImpl(masm, false); } | 4505 void LoadICStub::Generate(MacroAssembler* masm) { GenerateImpl(masm, false); } |
4515 | 4506 |
4516 | 4507 |
4517 void LoadICStub::GenerateForTrampoline(MacroAssembler* masm) { | 4508 void LoadICStub::GenerateForTrampoline(MacroAssembler* masm) { |
4518 GenerateImpl(masm, true); | 4509 GenerateImpl(masm, true); |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4717 __ bind(&miss); | 4708 __ bind(&miss); |
4718 KeyedLoadIC::GenerateMiss(masm); | 4709 KeyedLoadIC::GenerateMiss(masm); |
4719 | 4710 |
4720 __ bind(&load_smi_map); | 4711 __ bind(&load_smi_map); |
4721 __ LoadRoot(receiver_map, Heap::kHeapNumberMapRootIndex); | 4712 __ LoadRoot(receiver_map, Heap::kHeapNumberMapRootIndex); |
4722 __ Branch(&compare_map); | 4713 __ Branch(&compare_map); |
4723 } | 4714 } |
4724 | 4715 |
4725 | 4716 |
4726 void VectorStoreICTrampolineStub::Generate(MacroAssembler* masm) { | 4717 void VectorStoreICTrampolineStub::Generate(MacroAssembler* masm) { |
4727 EmitLoadTypeFeedbackVector(masm, VectorStoreICDescriptor::VectorRegister()); | 4718 __ EmitLoadTypeFeedbackVector(VectorStoreICDescriptor::VectorRegister()); |
4728 VectorStoreICStub stub(isolate(), state()); | 4719 VectorStoreICStub stub(isolate(), state()); |
4729 stub.GenerateForTrampoline(masm); | 4720 stub.GenerateForTrampoline(masm); |
4730 } | 4721 } |
4731 | 4722 |
4732 | 4723 |
4733 void VectorKeyedStoreICTrampolineStub::Generate(MacroAssembler* masm) { | 4724 void VectorKeyedStoreICTrampolineStub::Generate(MacroAssembler* masm) { |
4734 EmitLoadTypeFeedbackVector(masm, VectorStoreICDescriptor::VectorRegister()); | 4725 __ EmitLoadTypeFeedbackVector(VectorStoreICDescriptor::VectorRegister()); |
4735 VectorKeyedStoreICStub stub(isolate(), state()); | 4726 VectorKeyedStoreICStub stub(isolate(), state()); |
4736 stub.GenerateForTrampoline(masm); | 4727 stub.GenerateForTrampoline(masm); |
4737 } | 4728 } |
4738 | 4729 |
4739 | 4730 |
4740 void VectorStoreICStub::Generate(MacroAssembler* masm) { | 4731 void VectorStoreICStub::Generate(MacroAssembler* masm) { |
4741 GenerateImpl(masm, false); | 4732 GenerateImpl(masm, false); |
4742 } | 4733 } |
4743 | 4734 |
4744 | 4735 |
(...skipping 1018 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5763 MemOperand(fp, 6 * kPointerSize), NULL); | 5754 MemOperand(fp, 6 * kPointerSize), NULL); |
5764 } | 5755 } |
5765 | 5756 |
5766 | 5757 |
5767 #undef __ | 5758 #undef __ |
5768 | 5759 |
5769 } // namespace internal | 5760 } // namespace internal |
5770 } // namespace v8 | 5761 } // namespace v8 |
5771 | 5762 |
5772 #endif // V8_TARGET_ARCH_MIPS64 | 5763 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |