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

Side by Side Diff: src/arm64/macro-assembler-arm64.cc

Issue 2106113002: Revert of [builtins] New frame type for exits to C++ builtins (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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/macro-assembler-arm64.h ('k') | src/builtins.h » ('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/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/base/division-by-constant.h" 8 #include "src/base/division-by-constant.h"
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 1741 matching lines...) Expand 10 before | Expand all | Expand 10 after
1752 1752
1753 void MacroAssembler::CallExternalReference(const ExternalReference& ext, 1753 void MacroAssembler::CallExternalReference(const ExternalReference& ext,
1754 int num_arguments) { 1754 int num_arguments) {
1755 Mov(x0, num_arguments); 1755 Mov(x0, num_arguments);
1756 Mov(x1, ext); 1756 Mov(x1, ext);
1757 1757
1758 CEntryStub stub(isolate(), 1); 1758 CEntryStub stub(isolate(), 1);
1759 CallStub(&stub); 1759 CallStub(&stub);
1760 } 1760 }
1761 1761
1762 void MacroAssembler::JumpToExternalReference(const ExternalReference& builtin, 1762
1763 bool builtin_exit_frame) { 1763 void MacroAssembler::JumpToExternalReference(const ExternalReference& builtin) {
1764 Mov(x1, builtin); 1764 Mov(x1, builtin);
1765 CEntryStub stub(isolate(), 1, kDontSaveFPRegs, kArgvOnStack, 1765 CEntryStub stub(isolate(), 1);
1766 builtin_exit_frame);
1767 Jump(stub.GetCode(), RelocInfo::CODE_TARGET); 1766 Jump(stub.GetCode(), RelocInfo::CODE_TARGET);
1768 } 1767 }
1769 1768
1769
1770 void MacroAssembler::TailCallRuntime(Runtime::FunctionId fid) { 1770 void MacroAssembler::TailCallRuntime(Runtime::FunctionId fid) {
1771 const Runtime::Function* function = Runtime::FunctionForId(fid); 1771 const Runtime::Function* function = Runtime::FunctionForId(fid);
1772 DCHECK_EQ(1, function->result_size); 1772 DCHECK_EQ(1, function->result_size);
1773 if (function->nargs >= 0) { 1773 if (function->nargs >= 0) {
1774 // TODO(1236192): Most runtime routines don't need the number of 1774 // TODO(1236192): Most runtime routines don't need the number of
1775 // arguments passed in because it is constant. At some point we 1775 // arguments passed in because it is constant. At some point we
1776 // should remove this need and make the runtime routine entry code 1776 // should remove this need and make the runtime routine entry code
1777 // smarter. 1777 // smarter.
1778 Mov(x0, function->nargs); 1778 Mov(x0, function->nargs);
1779 } 1779 }
(...skipping 1036 matching lines...) Expand 10 before | Expand all | Expand 10 after
2816 2816
2817 int offset = ExitFrameConstants::kLastExitFrameField; 2817 int offset = ExitFrameConstants::kLastExitFrameField;
2818 while (!saved_fp_regs.IsEmpty()) { 2818 while (!saved_fp_regs.IsEmpty()) {
2819 const CPURegister& dst0 = saved_fp_regs.PopHighestIndex(); 2819 const CPURegister& dst0 = saved_fp_regs.PopHighestIndex();
2820 const CPURegister& dst1 = saved_fp_regs.PopHighestIndex(); 2820 const CPURegister& dst1 = saved_fp_regs.PopHighestIndex();
2821 offset -= 2 * kDRegSize; 2821 offset -= 2 * kDRegSize;
2822 Ldp(dst1, dst0, MemOperand(fp, offset)); 2822 Ldp(dst1, dst0, MemOperand(fp, offset));
2823 } 2823 }
2824 } 2824 }
2825 2825
2826 void MacroAssembler::EnterExitFrame(bool save_doubles, const Register& scratch, 2826
2827 int extra_space, 2827 void MacroAssembler::EnterExitFrame(bool save_doubles,
2828 StackFrame::Type frame_type) { 2828 const Register& scratch,
2829 int extra_space) {
2829 DCHECK(jssp.Is(StackPointer())); 2830 DCHECK(jssp.Is(StackPointer()));
2830 DCHECK(frame_type == StackFrame::EXIT ||
2831 frame_type == StackFrame::BUILTIN_EXIT);
2832 2831
2833 // Set up the new stack frame. 2832 // Set up the new stack frame.
2834 Push(lr, fp); 2833 Push(lr, fp);
2835 Mov(fp, StackPointer()); 2834 Mov(fp, StackPointer());
2836 Mov(scratch, Smi::FromInt(frame_type)); 2835 Mov(scratch, Smi::FromInt(StackFrame::EXIT));
2837 Push(scratch); 2836 Push(scratch);
2838 Push(xzr); 2837 Push(xzr);
2839 Mov(scratch, Operand(CodeObject())); 2838 Mov(scratch, Operand(CodeObject()));
2840 Push(scratch); 2839 Push(scratch);
2841 // fp[8]: CallerPC (lr) 2840 // fp[8]: CallerPC (lr)
2842 // fp -> fp[0]: CallerFP (old fp) 2841 // fp -> fp[0]: CallerFP (old fp)
2843 // fp[-8]: STUB marker 2842 // fp[-8]: STUB marker
2844 // fp[-16]: Space reserved for SPOffset. 2843 // fp[-16]: Space reserved for SPOffset.
2845 // jssp -> fp[-24]: CodeObject() 2844 // jssp -> fp[-24]: CodeObject()
2846 STATIC_ASSERT((2 * kPointerSize) == ExitFrameConstants::kCallerSPOffset); 2845 STATIC_ASSERT((2 * kPointerSize) == ExitFrameConstants::kCallerSPOffset);
(...skipping 2291 matching lines...) Expand 10 before | Expand all | Expand 10 after
5138 } 5137 }
5139 5138
5140 5139
5141 #undef __ 5140 #undef __
5142 5141
5143 5142
5144 } // namespace internal 5143 } // namespace internal
5145 } // namespace v8 5144 } // namespace v8
5146 5145
5147 #endif // V8_TARGET_ARCH_ARM64 5146 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/arm64/macro-assembler-arm64.h ('k') | src/builtins.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698