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

Side by Side Diff: src/mips64/code-stubs-mips64.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/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
1070 1067
1071 ProfileEntryHookStub::MaybeCallEntryHook(masm); 1068 ProfileEntryHookStub::MaybeCallEntryHook(masm);
1072 1069
1073 if (!argv_in_register()) { 1070 // Compute the argv pointer in a callee-saved register.
1074 // Compute the argv pointer in a callee-saved register. 1071 __ dsll(s1, a0, kPointerSizeLog2);
1075 __ dsll(s1, a0, kPointerSizeLog2); 1072 __ Daddu(s1, sp, s1);
1076 __ Daddu(s1, sp, s1); 1073 __ Dsubu(s1, s1, kPointerSize);
1077 __ Dsubu(s1, s1, kPointerSize);
1078 } else {
1079 __ mov(s1, a2);
1080 }
1081 1074
1082 // Enter the exit frame that transitions from JavaScript to C++. 1075 // Enter the exit frame that transitions from JavaScript to C++.
1083 FrameScope scope(masm, StackFrame::MANUAL); 1076 FrameScope scope(masm, StackFrame::MANUAL);
1084 __ EnterExitFrame(save_doubles()); 1077 __ EnterExitFrame(save_doubles());
1085 1078
1086 // s0: number of arguments including receiver (C callee-saved) 1079 // s0: number of arguments including receiver (C callee-saved)
1087 // s1: pointer to first argument (C callee-saved) 1080 // s1: pointer to first argument (C callee-saved)
1088 // s2: pointer to builtin function (C callee-saved) 1081 // s2: pointer to builtin function (C callee-saved)
1089 1082
1090 // Prepare arguments for C routine. 1083 // Prepare arguments for C routine.
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
1150 // Cannot use check here as it attempts to generate call into runtime. 1143 // Cannot use check here as it attempts to generate call into runtime.
1151 __ Branch(&okay, eq, a4, Operand(a2)); 1144 __ Branch(&okay, eq, a4, Operand(a2));
1152 __ stop("Unexpected pending exception"); 1145 __ stop("Unexpected pending exception");
1153 __ bind(&okay); 1146 __ bind(&okay);
1154 } 1147 }
1155 1148
1156 // Exit C frame and return. 1149 // Exit C frame and return.
1157 // v0:v1: result 1150 // v0:v1: result
1158 // sp: stack pointer 1151 // sp: stack pointer
1159 // fp: frame pointer 1152 // fp: frame pointer
1160 Register argc; 1153 // s0: still holds argc (callee-saved).
1161 if (!argv_in_register()) { 1154 __ LeaveExitFrame(save_doubles(), s0, true, EMIT_RETURN);
1162 // s0: still holds argc (callee-saved).
1163 argc = s0;
1164 }
1165 __ LeaveExitFrame(save_doubles(), argc, true, EMIT_RETURN);
1166 1155
1167 // Handling of exception. 1156 // Handling of exception.
1168 __ bind(&exception_returned); 1157 __ bind(&exception_returned);
1169 1158
1170 ExternalReference pending_handler_context_address( 1159 ExternalReference pending_handler_context_address(
1171 Isolate::kPendingHandlerContextAddress, isolate()); 1160 Isolate::kPendingHandlerContextAddress, isolate());
1172 ExternalReference pending_handler_code_address( 1161 ExternalReference pending_handler_code_address(
1173 Isolate::kPendingHandlerCodeAddress, isolate()); 1162 Isolate::kPendingHandlerCodeAddress, isolate());
1174 ExternalReference pending_handler_offset_address( 1163 ExternalReference pending_handler_offset_address(
1175 Isolate::kPendingHandlerOffsetAddress, isolate()); 1164 Isolate::kPendingHandlerOffsetAddress, isolate());
(...skipping 4595 matching lines...) Expand 10 before | Expand all | Expand 10 after
5771 MemOperand(fp, 6 * kPointerSize), NULL); 5760 MemOperand(fp, 6 * kPointerSize), NULL);
5772 } 5761 }
5773 5762
5774 5763
5775 #undef __ 5764 #undef __
5776 5765
5777 } // namespace internal 5766 } // namespace internal
5778 } // namespace v8 5767 } // namespace v8
5779 5768
5780 #endif // V8_TARGET_ARCH_MIPS64 5769 #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