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

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

Issue 1379933003: Revert of [Interpreter] Add CallRuntime support to the interpreter. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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/mips/builtins-mips.cc ('k') | src/mips/interface-descriptors-mips.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_MIPS 5 #if V8_TARGET_ARCH_MIPS
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/bootstrapper.h" 8 #include "src/bootstrapper.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 1048 matching lines...) Expand 10 before | Expand all | Expand 10 after
1059 } 1059 }
1060 1060
1061 1061
1062 void CEntryStub::Generate(MacroAssembler* masm) { 1062 void CEntryStub::Generate(MacroAssembler* masm) {
1063 // Called from JavaScript; parameters are on stack as if calling JS function 1063 // Called from JavaScript; parameters are on stack as if calling JS function
1064 // a0: number of arguments including receiver 1064 // a0: number of arguments including receiver
1065 // a1: pointer to builtin function 1065 // a1: pointer to builtin function
1066 // fp: frame pointer (restored after C call) 1066 // fp: frame pointer (restored after C call)
1067 // sp: stack pointer (restored as callee's sp after C call) 1067 // sp: stack pointer (restored as callee's sp after C call)
1068 // cp: current context (C callee-saved) 1068 // cp: current context (C callee-saved)
1069 //
1070 // If argv_in_register():
1071 // a2: pointer to the first argument
1072 1069
1073 ProfileEntryHookStub::MaybeCallEntryHook(masm); 1070 ProfileEntryHookStub::MaybeCallEntryHook(masm);
1074 1071
1075 if (!argv_in_register()) { 1072 // Compute the argv pointer in a callee-saved register.
1076 // Compute the argv pointer in a callee-saved register. 1073 __ sll(s1, a0, kPointerSizeLog2);
1077 __ sll(s1, a0, kPointerSizeLog2); 1074 __ Addu(s1, sp, s1);
1078 __ Addu(s1, sp, s1); 1075 __ Subu(s1, s1, kPointerSize);
1079 __ Subu(s1, s1, kPointerSize);
1080 } else {
1081 __ mov(s1, a2);
1082 }
1083 1076
1084 // Enter the exit frame that transitions from JavaScript to C++. 1077 // Enter the exit frame that transitions from JavaScript to C++.
1085 FrameScope scope(masm, StackFrame::MANUAL); 1078 FrameScope scope(masm, StackFrame::MANUAL);
1086 __ EnterExitFrame(save_doubles()); 1079 __ EnterExitFrame(save_doubles());
1087 1080
1088 // s0: number of arguments including receiver (C callee-saved) 1081 // s0: number of arguments including receiver (C callee-saved)
1089 // s1: pointer to first argument (C callee-saved) 1082 // s1: pointer to first argument (C callee-saved)
1090 // s2: pointer to builtin function (C callee-saved) 1083 // s2: pointer to builtin function (C callee-saved)
1091 1084
1092 // Prepare arguments for C routine. 1085 // Prepare arguments for C routine.
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
1153 // Cannot use check here as it attempts to generate call into runtime. 1146 // Cannot use check here as it attempts to generate call into runtime.
1154 __ Branch(&okay, eq, t0, Operand(a2)); 1147 __ Branch(&okay, eq, t0, Operand(a2));
1155 __ stop("Unexpected pending exception"); 1148 __ stop("Unexpected pending exception");
1156 __ bind(&okay); 1149 __ bind(&okay);
1157 } 1150 }
1158 1151
1159 // Exit C frame and return. 1152 // Exit C frame and return.
1160 // v0:v1: result 1153 // v0:v1: result
1161 // sp: stack pointer 1154 // sp: stack pointer
1162 // fp: frame pointer 1155 // fp: frame pointer
1163 Register argc; 1156 // s0: still holds argc (callee-saved).
1164 if (!argv_in_register()) { 1157 __ LeaveExitFrame(save_doubles(), s0, true, EMIT_RETURN);
1165 // s0: still holds argc (callee-saved).
1166 argc = s0;
1167 }
1168 __ LeaveExitFrame(save_doubles(), argc, true, EMIT_RETURN);
1169 1158
1170 // Handling of exception. 1159 // Handling of exception.
1171 __ bind(&exception_returned); 1160 __ bind(&exception_returned);
1172 1161
1173 ExternalReference pending_handler_context_address( 1162 ExternalReference pending_handler_context_address(
1174 Isolate::kPendingHandlerContextAddress, isolate()); 1163 Isolate::kPendingHandlerContextAddress, isolate());
1175 ExternalReference pending_handler_code_address( 1164 ExternalReference pending_handler_code_address(
1176 Isolate::kPendingHandlerCodeAddress, isolate()); 1165 Isolate::kPendingHandlerCodeAddress, isolate());
1177 ExternalReference pending_handler_offset_address( 1166 ExternalReference pending_handler_offset_address(
1178 Isolate::kPendingHandlerOffsetAddress, isolate()); 1167 Isolate::kPendingHandlerOffsetAddress, isolate());
(...skipping 4559 matching lines...) Expand 10 before | Expand all | Expand 10 after
5738 MemOperand(fp, 6 * kPointerSize), NULL); 5727 MemOperand(fp, 6 * kPointerSize), NULL);
5739 } 5728 }
5740 5729
5741 5730
5742 #undef __ 5731 #undef __
5743 5732
5744 } // namespace internal 5733 } // namespace internal
5745 } // namespace v8 5734 } // namespace v8
5746 5735
5747 #endif // V8_TARGET_ARCH_MIPS 5736 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/builtins-mips.cc ('k') | src/mips/interface-descriptors-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698