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/s390/builtins-s390.cc

Issue 1884133002: [Interpreter] Add support for FunctionEntryHook. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Make test stricter Created 4 years, 8 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/ppc/builtins-ppc.cc ('k') | src/x64/builtins-x64.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_S390 5 #if V8_TARGET_ARCH_S390
6 6
7 #include "src/codegen.h" 7 #include "src/codegen.h"
8 #include "src/debug/debug.h" 8 #include "src/debug/debug.h"
9 #include "src/deoptimizer.h" 9 #include "src/deoptimizer.h"
10 #include "src/full-codegen/full-codegen.h" 10 #include "src/full-codegen/full-codegen.h"
(...skipping 940 matching lines...) Expand 10 before | Expand all | Expand 10 after
951 // o r5: the new target 951 // o r5: the new target
952 // o cp: our context 952 // o cp: our context
953 // o pp: the caller's constant pool pointer (if enabled) 953 // o pp: the caller's constant pool pointer (if enabled)
954 // o fp: the caller's frame pointer 954 // o fp: the caller's frame pointer
955 // o sp: stack pointer 955 // o sp: stack pointer
956 // o lr: return address 956 // o lr: return address
957 // 957 //
958 // The function builds an interpreter frame. See InterpreterFrameConstants in 958 // The function builds an interpreter frame. See InterpreterFrameConstants in
959 // frames.h for its layout. 959 // frames.h for its layout.
960 void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) { 960 void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
961 ProfileEntryHookStub::MaybeCallEntryHook(masm);
962
961 // Open a frame scope to indicate that there is a frame on the stack. The 963 // Open a frame scope to indicate that there is a frame on the stack. The
962 // MANUAL indicates that the scope shouldn't actually generate code to set up 964 // MANUAL indicates that the scope shouldn't actually generate code to set up
963 // the frame (that is done below). 965 // the frame (that is done below).
964 FrameScope frame_scope(masm, StackFrame::MANUAL); 966 FrameScope frame_scope(masm, StackFrame::MANUAL);
965 __ PushStandardFrame(r3); 967 __ PushStandardFrame(r3);
966 968
967 // Get the bytecode array from the function object and load the pointer to the 969 // Get the bytecode array from the function object and load the pointer to the
968 // first entry into kInterpreterBytecodeRegister. 970 // first entry into kInterpreterBytecodeRegister.
969 __ LoadP(r2, FieldMemOperand(r3, JSFunction::kSharedFunctionInfoOffset)); 971 __ LoadP(r2, FieldMemOperand(r3, JSFunction::kSharedFunctionInfoOffset));
970 Label array_done; 972 Label array_done;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
1017 __ LoadAndTestP(r4, r4); 1019 __ LoadAndTestP(r4, r4);
1018 __ beq(&no_args); 1020 __ beq(&no_args);
1019 __ LoadRR(r1, r4); 1021 __ LoadRR(r1, r4);
1020 __ bind(&loop); 1022 __ bind(&loop);
1021 __ push(r5); 1023 __ push(r5);
1022 __ SubP(r1, Operand(1)); 1024 __ SubP(r1, Operand(1));
1023 __ bne(&loop); 1025 __ bne(&loop);
1024 __ bind(&no_args); 1026 __ bind(&no_args);
1025 } 1027 }
1026 1028
1027 // TODO(rmcilroy): List of things not currently dealt with here but done in
1028 // fullcodegen's prologue:
1029 // - Call ProfileEntryHookStub when isolate has a function_entry_hook.
1030 // - Code aging of the BytecodeArray object.
1031
1032 // Load accumulator, register file, bytecode offset, dispatch table into 1029 // Load accumulator, register file, bytecode offset, dispatch table into
1033 // registers. 1030 // registers.
1034 __ LoadRoot(kInterpreterAccumulatorRegister, Heap::kUndefinedValueRootIndex); 1031 __ LoadRoot(kInterpreterAccumulatorRegister, Heap::kUndefinedValueRootIndex);
1035 __ AddP(kInterpreterRegisterFileRegister, fp, 1032 __ AddP(kInterpreterRegisterFileRegister, fp,
1036 Operand(InterpreterFrameConstants::kRegisterFilePointerFromFp)); 1033 Operand(InterpreterFrameConstants::kRegisterFilePointerFromFp));
1037 __ mov(kInterpreterBytecodeOffsetRegister, 1034 __ mov(kInterpreterBytecodeOffsetRegister,
1038 Operand(BytecodeArray::kHeaderSize - kHeapObjectTag)); 1035 Operand(BytecodeArray::kHeaderSize - kHeapObjectTag));
1039 __ mov(kInterpreterDispatchTableRegister, 1036 __ mov(kInterpreterDispatchTableRegister,
1040 Operand(ExternalReference::interpreter_dispatch_table_address( 1037 Operand(ExternalReference::interpreter_dispatch_table_address(
1041 masm->isolate()))); 1038 masm->isolate())));
(...skipping 1627 matching lines...) Expand 10 before | Expand all | Expand 10 after
2669 __ bkpt(0); 2666 __ bkpt(0);
2670 } 2667 }
2671 } 2668 }
2672 2669
2673 #undef __ 2670 #undef __
2674 2671
2675 } // namespace internal 2672 } // namespace internal
2676 } // namespace v8 2673 } // namespace v8
2677 2674
2678 #endif // V8_TARGET_ARCH_S390 2675 #endif // V8_TARGET_ARCH_S390
OLDNEW
« no previous file with comments | « src/ppc/builtins-ppc.cc ('k') | src/x64/builtins-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698