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

Side by Side Diff: src/mips64/builtins-mips64.cc

Issue 1323463005: [Interpreter] Add support for JS calls. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add MIPS port contributed by akos.palfi@imgtec.com 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/mips/interface-descriptors-mips.cc ('k') | src/mips64/interface-descriptors-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 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/codegen.h" 7 #include "src/codegen.h"
8 #include "src/debug/debug.h" 8 #include "src/debug/debug.h"
9 #include "src/deoptimizer.h" 9 #include "src/deoptimizer.h"
10 #include "src/full-codegen/full-codegen.h" 10 #include "src/full-codegen/full-codegen.h"
(...skipping 1643 matching lines...) Expand 10 before | Expand all | Expand 10 after
1654 __ mov(a1, v0); 1654 __ mov(a1, v0);
1655 __ Pop(a0); 1655 __ Pop(a0);
1656 __ SmiUntag(a0); 1656 __ SmiUntag(a0);
1657 } 1657 }
1658 // The delegate is always a regular function. 1658 // The delegate is always a regular function.
1659 __ AssertFunction(a1); 1659 __ AssertFunction(a1);
1660 __ Jump(masm->isolate()->builtins()->CallFunction(), RelocInfo::CODE_TARGET); 1660 __ Jump(masm->isolate()->builtins()->CallFunction(), RelocInfo::CODE_TARGET);
1661 } 1661 }
1662 1662
1663 1663
1664 // static
1665 void Builtins::Generate_PushArgsAndCall(MacroAssembler* masm) {
1666 // ----------- S t a t e -------------
1667 // -- a0 : the number of arguments (not including the receiver)
1668 // -- a2 : the address of the first argument to be pushed. Subsequent
1669 // arguments should be consecutive above this, in the same order as
1670 // they are to be pushed onto the stack.
1671 // -- a1 : the target to call (can be any Object).
1672
1673 // Find the address of the last argument.
1674 __ Daddu(a3, a0, Operand(1)); // Add one for receiver.
1675 __ dsll(a3, a3, kPointerSizeLog2);
1676 __ Dsubu(a3, a2, Operand(a3));
1677
1678 // Push the arguments.
1679 Label loop_header, loop_check;
1680 __ Branch(&loop_check);
1681 __ bind(&loop_header);
1682 __ ld(a4, MemOperand(a2));
1683 __ Daddu(a2, a2, Operand(-kPointerSize));
1684 __ push(a4);
1685 __ bind(&loop_check);
1686 __ Branch(&loop_header, gt, a2, Operand(a3));
1687
1688 // Call the target.
1689 __ Jump(masm->isolate()->builtins()->Call(), RelocInfo::CODE_TARGET);
1690 }
1691
1692
1664 void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) { 1693 void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) {
1665 // State setup as expected by MacroAssembler::InvokePrologue. 1694 // State setup as expected by MacroAssembler::InvokePrologue.
1666 // ----------- S t a t e ------------- 1695 // ----------- S t a t e -------------
1667 // -- a0: actual arguments count 1696 // -- a0: actual arguments count
1668 // -- a1: function (passed through to callee) 1697 // -- a1: function (passed through to callee)
1669 // -- a2: expected arguments count 1698 // -- a2: expected arguments count
1670 // ----------------------------------- 1699 // -----------------------------------
1671 1700
1672 Label stack_overflow; 1701 Label stack_overflow;
1673 ArgumentAdaptorStackCheck(masm, &stack_overflow); 1702 ArgumentAdaptorStackCheck(masm, &stack_overflow);
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
1813 } 1842 }
1814 } 1843 }
1815 1844
1816 1845
1817 #undef __ 1846 #undef __
1818 1847
1819 } // namespace internal 1848 } // namespace internal
1820 } // namespace v8 1849 } // namespace v8
1821 1850
1822 #endif // V8_TARGET_ARCH_MIPS64 1851 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/mips/interface-descriptors-mips.cc ('k') | src/mips64/interface-descriptors-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698