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/code-stubs.h" | 7 #include "src/code-stubs.h" |
8 #include "src/api-arguments.h" | 8 #include "src/api-arguments.h" |
9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 1749 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1760 | 1760 |
1761 static void CallStubInRecordCallTarget(MacroAssembler* masm, CodeStub* stub) { | 1761 static void CallStubInRecordCallTarget(MacroAssembler* masm, CodeStub* stub) { |
1762 // a0 : number of arguments to the construct function | 1762 // a0 : number of arguments to the construct function |
1763 // a2 : feedback vector | 1763 // a2 : feedback vector |
1764 // a3 : slot in feedback vector (Smi) | 1764 // a3 : slot in feedback vector (Smi) |
1765 // a1 : the function to call | 1765 // a1 : the function to call |
1766 FrameScope scope(masm, StackFrame::INTERNAL); | 1766 FrameScope scope(masm, StackFrame::INTERNAL); |
1767 const RegList kSavedRegs = 1 << 4 | // a0 | 1767 const RegList kSavedRegs = 1 << 4 | // a0 |
1768 1 << 5 | // a1 | 1768 1 << 5 | // a1 |
1769 1 << 6 | // a2 | 1769 1 << 6 | // a2 |
1770 1 << 7; // a3 | 1770 1 << 7 | // a3 |
1771 | 1771 1 << cp.code(); |
1772 | 1772 |
1773 // Number-of-arguments register must be smi-tagged to call out. | 1773 // Number-of-arguments register must be smi-tagged to call out. |
1774 __ SmiTag(a0); | 1774 __ SmiTag(a0); |
1775 __ MultiPush(kSavedRegs); | 1775 __ MultiPush(kSavedRegs); |
1776 | 1776 |
1777 __ CallStub(stub); | 1777 __ CallStub(stub); |
1778 | 1778 |
1779 __ MultiPop(kSavedRegs); | 1779 __ MultiPop(kSavedRegs); |
1780 __ SmiUntag(a0); | 1780 __ SmiUntag(a0); |
1781 } | 1781 } |
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2111 __ li(t0, Operand(Smi::FromInt(1))); | 2111 __ li(t0, Operand(Smi::FromInt(1))); |
2112 __ sd(t0, FieldMemOperand(at, FixedArray::kHeaderSize + kPointerSize)); | 2112 __ sd(t0, FieldMemOperand(at, FixedArray::kHeaderSize + kPointerSize)); |
2113 | 2113 |
2114 // Store the function. Use a stub since we need a frame for allocation. | 2114 // Store the function. Use a stub since we need a frame for allocation. |
2115 // a2 - vector | 2115 // a2 - vector |
2116 // a3 - slot | 2116 // a3 - slot |
2117 // a1 - function | 2117 // a1 - function |
2118 { | 2118 { |
2119 FrameScope scope(masm, StackFrame::INTERNAL); | 2119 FrameScope scope(masm, StackFrame::INTERNAL); |
2120 CreateWeakCellStub create_stub(masm->isolate()); | 2120 CreateWeakCellStub create_stub(masm->isolate()); |
2121 __ Push(a1); | 2121 __ Push(cp, a1); |
2122 __ CallStub(&create_stub); | 2122 __ CallStub(&create_stub); |
2123 __ Pop(a1); | 2123 __ Pop(cp, a1); |
2124 } | 2124 } |
2125 | 2125 |
2126 __ Branch(&call_function); | 2126 __ Branch(&call_function); |
2127 | 2127 |
2128 // We are here because tracing is on or we encountered a MISS case we can't | 2128 // We are here because tracing is on or we encountered a MISS case we can't |
2129 // handle here. | 2129 // handle here. |
2130 __ bind(&miss); | 2130 __ bind(&miss); |
2131 GenerateMiss(masm); | 2131 GenerateMiss(masm); |
2132 | 2132 |
2133 __ Branch(&call); | 2133 __ Branch(&call); |
(...skipping 3309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5443 kStackUnwindSpace, kInvalidStackOffset, | 5443 kStackUnwindSpace, kInvalidStackOffset, |
5444 return_value_operand, NULL); | 5444 return_value_operand, NULL); |
5445 } | 5445 } |
5446 | 5446 |
5447 #undef __ | 5447 #undef __ |
5448 | 5448 |
5449 } // namespace internal | 5449 } // namespace internal |
5450 } // namespace v8 | 5450 } // namespace v8 |
5451 | 5451 |
5452 #endif // V8_TARGET_ARCH_MIPS64 | 5452 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |