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

Side by Side Diff: src/mips64/code-stubs-mips64.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 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/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 1044 matching lines...) Expand 10 before | Expand all | Expand 10 after
1055 } 1055 }
1056 1056
1057 1057
1058 void CEntryStub::Generate(MacroAssembler* masm) { 1058 void CEntryStub::Generate(MacroAssembler* masm) {
1059 // Called from JavaScript; parameters are on stack as if calling JS function 1059 // Called from JavaScript; parameters are on stack as if calling JS function
1060 // a0: number of arguments including receiver 1060 // a0: number of arguments including receiver
1061 // a1: pointer to builtin function 1061 // a1: pointer to builtin function
1062 // fp: frame pointer (restored after C call) 1062 // fp: frame pointer (restored after C call)
1063 // sp: stack pointer (restored as callee's sp after C call) 1063 // sp: stack pointer (restored as callee's sp after C call)
1064 // cp: current context (C callee-saved) 1064 // cp: current context (C callee-saved)
1065 //
1066 // If argv_in_register():
1067 // a2: pointer to the first argument
1065 1068
1066 ProfileEntryHookStub::MaybeCallEntryHook(masm); 1069 ProfileEntryHookStub::MaybeCallEntryHook(masm);
1067 1070
1068 // Compute the argv pointer in a callee-saved register. 1071 if (!argv_in_register()) {
1069 __ dsll(s1, a0, kPointerSizeLog2); 1072 // Compute the argv pointer in a callee-saved register.
1070 __ Daddu(s1, sp, s1); 1073 __ dsll(s1, a0, kPointerSizeLog2);
1071 __ Dsubu(s1, s1, kPointerSize); 1074 __ Daddu(s1, sp, s1);
1075 __ Dsubu(s1, s1, kPointerSize);
1076 } else {
1077 __ mov(s1, a2);
1078 }
1072 1079
1073 // Enter the exit frame that transitions from JavaScript to C++. 1080 // Enter the exit frame that transitions from JavaScript to C++.
1074 FrameScope scope(masm, StackFrame::MANUAL); 1081 FrameScope scope(masm, StackFrame::MANUAL);
1075 __ EnterExitFrame(save_doubles()); 1082 __ EnterExitFrame(save_doubles());
1076 1083
1077 // s0: number of arguments including receiver (C callee-saved) 1084 // s0: number of arguments including receiver (C callee-saved)
1078 // s1: pointer to first argument (C callee-saved) 1085 // s1: pointer to first argument (C callee-saved)
1079 // s2: pointer to builtin function (C callee-saved) 1086 // s2: pointer to builtin function (C callee-saved)
1080 1087
1081 // Prepare arguments for C routine. 1088 // Prepare arguments for C routine.
(...skipping 4672 matching lines...) Expand 10 before | Expand all | Expand 10 after
5754 MemOperand(fp, 6 * kPointerSize), NULL); 5761 MemOperand(fp, 6 * kPointerSize), NULL);
5755 } 5762 }
5756 5763
5757 5764
5758 #undef __ 5765 #undef __
5759 5766
5760 } // namespace internal 5767 } // namespace internal
5761 } // namespace v8 5768 } // namespace v8
5762 5769
5763 #endif // V8_TARGET_ARCH_MIPS64 5770 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698