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_MIPS | 5 #if V8_TARGET_ARCH_MIPS |
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/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
(...skipping 1748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1759 | 1759 |
1760 static void CallStubInRecordCallTarget(MacroAssembler* masm, CodeStub* stub) { | 1760 static void CallStubInRecordCallTarget(MacroAssembler* masm, CodeStub* stub) { |
1761 // a0 : number of arguments to the construct function | 1761 // a0 : number of arguments to the construct function |
1762 // a2 : feedback vector | 1762 // a2 : feedback vector |
1763 // a3 : slot in feedback vector (Smi) | 1763 // a3 : slot in feedback vector (Smi) |
1764 // a1 : the function to call | 1764 // a1 : the function to call |
1765 FrameScope scope(masm, StackFrame::INTERNAL); | 1765 FrameScope scope(masm, StackFrame::INTERNAL); |
1766 const RegList kSavedRegs = 1 << 4 | // a0 | 1766 const RegList kSavedRegs = 1 << 4 | // a0 |
1767 1 << 5 | // a1 | 1767 1 << 5 | // a1 |
1768 1 << 6 | // a2 | 1768 1 << 6 | // a2 |
1769 1 << 7; // a3 | 1769 1 << 7 | // a3 |
| 1770 1 << cp.code(); |
1770 | 1771 |
1771 // Number-of-arguments register must be smi-tagged to call out. | 1772 // Number-of-arguments register must be smi-tagged to call out. |
1772 __ SmiTag(a0); | 1773 __ SmiTag(a0); |
1773 __ MultiPush(kSavedRegs); | 1774 __ MultiPush(kSavedRegs); |
1774 | 1775 |
1775 __ CallStub(stub); | 1776 __ CallStub(stub); |
1776 | 1777 |
1777 __ MultiPop(kSavedRegs); | 1778 __ MultiPop(kSavedRegs); |
1778 __ SmiUntag(a0); | 1779 __ SmiUntag(a0); |
1779 } | 1780 } |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2057 __ li(t0, Operand(Smi::FromInt(1))); | 2058 __ li(t0, Operand(Smi::FromInt(1))); |
2058 __ sw(t0, FieldMemOperand(at, FixedArray::kHeaderSize + kPointerSize)); | 2059 __ sw(t0, FieldMemOperand(at, FixedArray::kHeaderSize + kPointerSize)); |
2059 | 2060 |
2060 // Store the function. Use a stub since we need a frame for allocation. | 2061 // Store the function. Use a stub since we need a frame for allocation. |
2061 // a2 - vector | 2062 // a2 - vector |
2062 // a3 - slot | 2063 // a3 - slot |
2063 // a1 - function | 2064 // a1 - function |
2064 { | 2065 { |
2065 FrameScope scope(masm, StackFrame::INTERNAL); | 2066 FrameScope scope(masm, StackFrame::INTERNAL); |
2066 CreateWeakCellStub create_stub(masm->isolate()); | 2067 CreateWeakCellStub create_stub(masm->isolate()); |
2067 __ Push(a1); | 2068 __ Push(cp, a1); |
2068 __ CallStub(&create_stub); | 2069 __ CallStub(&create_stub); |
2069 __ Pop(a1); | 2070 __ Pop(cp, a1); |
2070 } | 2071 } |
2071 | 2072 |
2072 __ Branch(&call_function); | 2073 __ Branch(&call_function); |
2073 | 2074 |
2074 // We are here because tracing is on or we encountered a MISS case we can't | 2075 // We are here because tracing is on or we encountered a MISS case we can't |
2075 // handle here. | 2076 // handle here. |
2076 __ bind(&miss); | 2077 __ bind(&miss); |
2077 GenerateMiss(masm); | 2078 GenerateMiss(masm); |
2078 | 2079 |
2079 __ Branch(&call); | 2080 __ Branch(&call); |
(...skipping 3330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5410 kStackUnwindSpace, kInvalidStackOffset, | 5411 kStackUnwindSpace, kInvalidStackOffset, |
5411 return_value_operand, NULL); | 5412 return_value_operand, NULL); |
5412 } | 5413 } |
5413 | 5414 |
5414 #undef __ | 5415 #undef __ |
5415 | 5416 |
5416 } // namespace internal | 5417 } // namespace internal |
5417 } // namespace v8 | 5418 } // namespace v8 |
5418 | 5419 |
5419 #endif // V8_TARGET_ARCH_MIPS | 5420 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |