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

Side by Side Diff: src/arm64/code-stubs-arm64.cc

Issue 1362383002: [Interpreter] Add CallRuntime support to the interpreter. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Move function address calculation into bytecode handler and have an option on CEntry stub for argv_… Created 5 years, 2 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
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/bootstrapper.h" 7 #include "src/bootstrapper.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/codegen.h" 9 #include "src/codegen.h"
10 #include "src/ic/handler-compiler.h" 10 #include "src/ic/handler-compiler.h"
(...skipping 1049 matching lines...) Expand 10 before | Expand all | Expand 10 after
1060 // 1060 //
1061 // Note that this stub must be generated before any use of Abort. 1061 // Note that this stub must be generated before any use of Abort.
1062 MacroAssembler::NoUseRealAbortsScope no_use_real_aborts(masm); 1062 MacroAssembler::NoUseRealAbortsScope no_use_real_aborts(masm);
1063 1063
1064 ASM_LOCATION("CEntryStub::Generate entry"); 1064 ASM_LOCATION("CEntryStub::Generate entry");
1065 ProfileEntryHookStub::MaybeCallEntryHook(masm); 1065 ProfileEntryHookStub::MaybeCallEntryHook(masm);
1066 1066
1067 // Register parameters: 1067 // Register parameters:
1068 // x0: argc (including receiver, untagged) 1068 // x0: argc (including receiver, untagged)
1069 // x1: target 1069 // x1: target
1070 // If argv_in_register():
1071 // x11: argv (pointer to first argument)
1070 // 1072 //
1071 // The stack on entry holds the arguments and the receiver, with the receiver 1073 // The stack on entry holds the arguments and the receiver, with the receiver
1072 // at the highest address: 1074 // at the highest address:
1073 // 1075 //
1074 // jssp]argc-1]: receiver 1076 // jssp]argc-1]: receiver
1075 // jssp[argc-2]: arg[argc-2] 1077 // jssp[argc-2]: arg[argc-2]
1076 // ... ... 1078 // ... ...
1077 // jssp[1]: arg[1] 1079 // jssp[1]: arg[1]
1078 // jssp[0]: arg[0] 1080 // jssp[0]: arg[0]
1079 // 1081 //
(...skipping 11 matching lines...) Expand all
1091 // into their argument registers, rather than using callee-saved registers and 1093 // into their argument registers, rather than using callee-saved registers and
1092 // preserving them on the stack. 1094 // preserving them on the stack.
1093 const Register& argv = x21; 1095 const Register& argv = x21;
1094 const Register& argc = x22; 1096 const Register& argc = x22;
1095 const Register& target = x23; 1097 const Register& target = x23;
1096 1098
1097 // Derive argv from the stack pointer so that it points to the first argument 1099 // Derive argv from the stack pointer so that it points to the first argument
1098 // (arg[argc-2]), or just below the receiver in case there are no arguments. 1100 // (arg[argc-2]), or just below the receiver in case there are no arguments.
1099 // - Adjust for the arg[] array. 1101 // - Adjust for the arg[] array.
1100 Register temp_argv = x11; 1102 Register temp_argv = x11;
1101 __ Add(temp_argv, jssp, Operand(x0, LSL, kPointerSizeLog2)); 1103 if (!argv_in_register()) {
1102 // - Adjust for the receiver. 1104 __ Add(temp_argv, jssp, Operand(x0, LSL, kPointerSizeLog2));
1103 __ Sub(temp_argv, temp_argv, 1 * kPointerSize); 1105 // - Adjust for the receiver.
1106 __ Sub(temp_argv, temp_argv, 1 * kPointerSize);
1107 }
1104 1108
1105 // Enter the exit frame. Reserve three slots to preserve x21-x23 callee-saved 1109 // Enter the exit frame. Reserve three slots to preserve x21-x23 callee-saved
1106 // registers. 1110 // registers.
1107 FrameScope scope(masm, StackFrame::MANUAL); 1111 FrameScope scope(masm, StackFrame::MANUAL);
1108 __ EnterExitFrame(save_doubles(), x10, 3); 1112 __ EnterExitFrame(save_doubles(), x10, 3);
1109 DCHECK(csp.Is(__ StackPointer())); 1113 DCHECK(csp.Is(__ StackPointer()));
1110 1114
1111 // Poke callee-saved registers into reserved space. 1115 // Poke callee-saved registers into reserved space.
1112 __ Poke(argv, 1 * kPointerSize); 1116 __ Poke(argv, 1 * kPointerSize);
1113 __ Poke(argc, 2 * kPointerSize); 1117 __ Poke(argc, 2 * kPointerSize);
(...skipping 4873 matching lines...) Expand 10 before | Expand all | Expand 10 after
5987 MemOperand(fp, 6 * kPointerSize), NULL); 5991 MemOperand(fp, 6 * kPointerSize), NULL);
5988 } 5992 }
5989 5993
5990 5994
5991 #undef __ 5995 #undef __
5992 5996
5993 } // namespace internal 5997 } // namespace internal
5994 } // namespace v8 5998 } // namespace v8
5995 5999
5996 #endif // V8_TARGET_ARCH_ARM64 6000 #endif // V8_TARGET_ARCH_ARM64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698