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

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

Powered by Google App Engine
This is Rietveld 408576698