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

Side by Side Diff: src/arm64/builtins-arm64.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/arm64/assembler-arm64.cc ('k') | src/arm64/interface-descriptors-arm64.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_ARM64 5 #if V8_TARGET_ARCH_ARM64
6 6
7 #include "src/arm64/frames-arm64.h" 7 #include "src/arm64/frames-arm64.h"
8 #include "src/codegen.h" 8 #include "src/codegen.h"
9 #include "src/debug/debug.h" 9 #include "src/debug/debug.h"
10 #include "src/deoptimizer.h" 10 #include "src/deoptimizer.h"
(...skipping 1682 matching lines...) Expand 10 before | Expand all | Expand 10 after
1693 __ Mov(x1, x0); 1693 __ Mov(x1, x0);
1694 __ Pop(x0); 1694 __ Pop(x0);
1695 __ SmiUntag(x0); 1695 __ SmiUntag(x0);
1696 } 1696 }
1697 // The delegate is always a regular function. 1697 // The delegate is always a regular function.
1698 __ AssertFunction(x1); 1698 __ AssertFunction(x1);
1699 __ Jump(masm->isolate()->builtins()->CallFunction(), RelocInfo::CODE_TARGET); 1699 __ Jump(masm->isolate()->builtins()->CallFunction(), RelocInfo::CODE_TARGET);
1700 } 1700 }
1701 1701
1702 1702
1703 // static
1704 void Builtins::Generate_PushArgsAndCall(MacroAssembler* masm) {
1705 // ----------- S t a t e -------------
1706 // -- x0 : the number of arguments (not including the receiver)
1707 // -- x2 : the address of the first argument to be pushed. Subsequent
1708 // arguments should be consecutive above this, in the same order as
1709 // they are to be pushed onto the stack.
1710 // -- x1 : the target to call (can be any Object).
1711
1712 // Find the address of the last argument.
1713 __ add(x3, x0, Operand(1)); // Add one for receiver.
1714 __ lsl(x3, x3, kPointerSizeLog2);
1715 __ sub(x4, x2, x3);
1716
1717 // Push the arguments.
1718 Label loop_header, loop_check;
1719 __ Mov(x5, jssp);
1720 __ Claim(x3, 1);
1721 __ B(&loop_check);
1722 __ Bind(&loop_header);
1723 // TODO(rmcilroy): Push two at a time once we ensure we keep stack aligned.
1724 __ Ldr(x3, MemOperand(x2, -kPointerSize, PostIndex));
1725 __ Str(x3, MemOperand(x5, -kPointerSize, PreIndex));
1726 __ Bind(&loop_check);
1727 __ Cmp(x2, x4);
1728 __ B(gt, &loop_header);
1729
1730 // Call the target.
1731 __ Jump(masm->isolate()->builtins()->Call(), RelocInfo::CODE_TARGET);
1732 }
1733
1734
1703 void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) { 1735 void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) {
1704 ASM_LOCATION("Builtins::Generate_ArgumentsAdaptorTrampoline"); 1736 ASM_LOCATION("Builtins::Generate_ArgumentsAdaptorTrampoline");
1705 // ----------- S t a t e ------------- 1737 // ----------- S t a t e -------------
1706 // -- x0 : actual number of arguments 1738 // -- x0 : actual number of arguments
1707 // -- x1 : function (passed through to callee) 1739 // -- x1 : function (passed through to callee)
1708 // -- x2 : expected number of arguments 1740 // -- x2 : expected number of arguments
1709 // ----------------------------------- 1741 // -----------------------------------
1710 1742
1711 Label stack_overflow; 1743 Label stack_overflow;
1712 ArgumentAdaptorStackCheck(masm, &stack_overflow); 1744 ArgumentAdaptorStackCheck(masm, &stack_overflow);
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
1868 } 1900 }
1869 } 1901 }
1870 1902
1871 1903
1872 #undef __ 1904 #undef __
1873 1905
1874 } // namespace internal 1906 } // namespace internal
1875 } // namespace v8 1907 } // namespace v8
1876 1908
1877 #endif // V8_TARGET_ARCH_ARM 1909 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm64/assembler-arm64.cc ('k') | src/arm64/interface-descriptors-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698