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

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: Fix arm32 debug build check errors. 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
« no previous file with comments | « src/mips64/builtins-mips64.cc ('k') | src/mips64/interface-descriptors-mips64.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 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 // Move argv into the correct register.
1072 __ Daddu(s1, sp, s1); 1075 __ mov(s1, a2);
1073 __ Dsubu(s1, s1, kPointerSize); 1076 } else {
1077 // Compute the argv pointer in a callee-saved register.
1078 __ dsll(s1, a0, kPointerSizeLog2);
1079 __ Daddu(s1, sp, s1);
1080 __ Dsubu(s1, s1, kPointerSize);
1081 }
1074 1082
1075 // Enter the exit frame that transitions from JavaScript to C++. 1083 // Enter the exit frame that transitions from JavaScript to C++.
1076 FrameScope scope(masm, StackFrame::MANUAL); 1084 FrameScope scope(masm, StackFrame::MANUAL);
1077 __ EnterExitFrame(save_doubles()); 1085 __ EnterExitFrame(save_doubles());
1078 1086
1079 // s0: number of arguments including receiver (C callee-saved) 1087 // s0: number of arguments including receiver (C callee-saved)
1080 // s1: pointer to first argument (C callee-saved) 1088 // s1: pointer to first argument (C callee-saved)
1081 // s2: pointer to builtin function (C callee-saved) 1089 // s2: pointer to builtin function (C callee-saved)
1082 1090
1083 // Prepare arguments for C routine. 1091 // Prepare arguments for C routine.
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
1143 // Cannot use check here as it attempts to generate call into runtime. 1151 // Cannot use check here as it attempts to generate call into runtime.
1144 __ Branch(&okay, eq, a4, Operand(a2)); 1152 __ Branch(&okay, eq, a4, Operand(a2));
1145 __ stop("Unexpected pending exception"); 1153 __ stop("Unexpected pending exception");
1146 __ bind(&okay); 1154 __ bind(&okay);
1147 } 1155 }
1148 1156
1149 // Exit C frame and return. 1157 // Exit C frame and return.
1150 // v0:v1: result 1158 // v0:v1: result
1151 // sp: stack pointer 1159 // sp: stack pointer
1152 // fp: frame pointer 1160 // fp: frame pointer
1153 // s0: still holds argc (callee-saved). 1161 Register argc;
1154 __ LeaveExitFrame(save_doubles(), s0, true, EMIT_RETURN); 1162 if (argv_in_register()) {
1163 // We don't want to pop arguments so set argc to no_reg.
1164 argc = no_reg;
1165 } else {
1166 // s0: still holds argc (callee-saved).
1167 argc = s0;
1168 }
1169 __ LeaveExitFrame(save_doubles(), argc, true, EMIT_RETURN);
1155 1170
1156 // Handling of exception. 1171 // Handling of exception.
1157 __ bind(&exception_returned); 1172 __ bind(&exception_returned);
1158 1173
1159 ExternalReference pending_handler_context_address( 1174 ExternalReference pending_handler_context_address(
1160 Isolate::kPendingHandlerContextAddress, isolate()); 1175 Isolate::kPendingHandlerContextAddress, isolate());
1161 ExternalReference pending_handler_code_address( 1176 ExternalReference pending_handler_code_address(
1162 Isolate::kPendingHandlerCodeAddress, isolate()); 1177 Isolate::kPendingHandlerCodeAddress, isolate());
1163 ExternalReference pending_handler_offset_address( 1178 ExternalReference pending_handler_offset_address(
1164 Isolate::kPendingHandlerOffsetAddress, isolate()); 1179 Isolate::kPendingHandlerOffsetAddress, isolate());
(...skipping 4595 matching lines...) Expand 10 before | Expand all | Expand 10 after
5760 MemOperand(fp, 6 * kPointerSize), NULL); 5775 MemOperand(fp, 6 * kPointerSize), NULL);
5761 } 5776 }
5762 5777
5763 5778
5764 #undef __ 5779 #undef __
5765 5780
5766 } // namespace internal 5781 } // namespace internal
5767 } // namespace v8 5782 } // namespace v8
5768 5783
5769 #endif // V8_TARGET_ARCH_MIPS64 5784 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/mips64/builtins-mips64.cc ('k') | src/mips64/interface-descriptors-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698