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

Side by Side Diff: src/arm/code-stubs-arm.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/arm/builtins-arm.cc ('k') | src/arm/interface-descriptors-arm.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_ARM 5 #if V8_TARGET_ARCH_ARM
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 956 matching lines...) Expand 10 before | Expand all | Expand 10 after
967 } 967 }
968 968
969 969
970 void CEntryStub::Generate(MacroAssembler* masm) { 970 void CEntryStub::Generate(MacroAssembler* masm) {
971 // Called from JavaScript; parameters are on stack as if calling JS function. 971 // Called from JavaScript; parameters are on stack as if calling JS function.
972 // r0: number of arguments including receiver 972 // r0: number of arguments including receiver
973 // r1: pointer to builtin function 973 // r1: pointer to builtin function
974 // fp: frame pointer (restored after C call) 974 // fp: frame pointer (restored after C call)
975 // sp: stack pointer (restored as callee's sp after C call) 975 // sp: stack pointer (restored as callee's sp after C call)
976 // cp: current context (C callee-saved) 976 // cp: current context (C callee-saved)
977 // 977
978 // If argv_in_register():
979 // r2: pointer to the first argument
980 ProfileEntryHookStub::MaybeCallEntryHook(masm); 978 ProfileEntryHookStub::MaybeCallEntryHook(masm);
981 979
982 __ mov(r5, Operand(r1)); 980 __ mov(r5, Operand(r1));
983 981
984 if (!argv_in_register()) { 982 // Compute the argv pointer in a callee-saved register.
985 // Compute the argv pointer in a callee-saved register. 983 __ add(r1, sp, Operand(r0, LSL, kPointerSizeLog2));
986 __ add(r1, sp, Operand(r0, LSL, kPointerSizeLog2)); 984 __ sub(r1, r1, Operand(kPointerSize));
987 __ sub(r1, r1, Operand(kPointerSize));
988 } else {
989 // Move argv into the correct register.
990 __ mov(r1, Operand(r2));
991 }
992 985
993 // Enter the exit frame that transitions from JavaScript to C++. 986 // Enter the exit frame that transitions from JavaScript to C++.
994 FrameScope scope(masm, StackFrame::MANUAL); 987 FrameScope scope(masm, StackFrame::MANUAL);
995 __ EnterExitFrame(save_doubles()); 988 __ EnterExitFrame(save_doubles());
996 989
997 // Store a copy of argc in callee-saved registers for later. 990 // Store a copy of argc in callee-saved registers for later.
998 __ mov(r4, Operand(r0)); 991 __ mov(r4, Operand(r0));
999 992
1000 // r0, r4: number of arguments including receiver (C callee-saved) 993 // r0, r4: number of arguments including receiver (C callee-saved)
1001 // r1: pointer to the first argument (C callee-saved) 994 // r1: pointer to the first argument (C callee-saved)
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
1057 // Cannot use check here as it attempts to generate call into runtime. 1050 // Cannot use check here as it attempts to generate call into runtime.
1058 __ b(eq, &okay); 1051 __ b(eq, &okay);
1059 __ stop("Unexpected pending exception"); 1052 __ stop("Unexpected pending exception");
1060 __ bind(&okay); 1053 __ bind(&okay);
1061 } 1054 }
1062 1055
1063 // Exit C frame and return. 1056 // Exit C frame and return.
1064 // r0:r1: result 1057 // r0:r1: result
1065 // sp: stack pointer 1058 // sp: stack pointer
1066 // fp: frame pointer 1059 // fp: frame pointer
1067 Register argc; 1060 // Callee-saved register r4 still holds argc.
1068 if (!argv_in_register()) { 1061 __ LeaveExitFrame(save_doubles(), r4, true);
1069 // Callee-saved register r4 still holds argc.
1070 argc = r4;
1071 }
1072 __ LeaveExitFrame(save_doubles(), argc, true);
1073 __ mov(pc, lr); 1062 __ mov(pc, lr);
1074 1063
1075 // Handling of exception. 1064 // Handling of exception.
1076 __ bind(&exception_returned); 1065 __ bind(&exception_returned);
1077 1066
1078 ExternalReference pending_handler_context_address( 1067 ExternalReference pending_handler_context_address(
1079 Isolate::kPendingHandlerContextAddress, isolate()); 1068 Isolate::kPendingHandlerContextAddress, isolate());
1080 ExternalReference pending_handler_code_address( 1069 ExternalReference pending_handler_code_address(
1081 Isolate::kPendingHandlerCodeAddress, isolate()); 1070 Isolate::kPendingHandlerCodeAddress, isolate());
1082 ExternalReference pending_handler_offset_address( 1071 ExternalReference pending_handler_offset_address(
(...skipping 4461 matching lines...) Expand 10 before | Expand all | Expand 10 after
5544 MemOperand(fp, 6 * kPointerSize), NULL); 5533 MemOperand(fp, 6 * kPointerSize), NULL);
5545 } 5534 }
5546 5535
5547 5536
5548 #undef __ 5537 #undef __
5549 5538
5550 } // namespace internal 5539 } // namespace internal
5551 } // namespace v8 5540 } // namespace v8
5552 5541
5553 #endif // V8_TARGET_ARCH_ARM 5542 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/builtins-arm.cc ('k') | src/arm/interface-descriptors-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698