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

Side by Side Diff: src/ppc/builtins-ppc.cc

Issue 2105023008: PPC/s390: [builtins] New frame type for exits to C++ builtins (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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 | « no previous file | src/ppc/code-stubs-ppc.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_PPC 5 #if V8_TARGET_ARCH_PPC
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"
11 #include "src/runtime/runtime.h" 11 #include "src/runtime/runtime.h"
12 12
13 namespace v8 { 13 namespace v8 {
14 namespace internal { 14 namespace internal {
15 15
16 16
17 #define __ ACCESS_MASM(masm) 17 #define __ ACCESS_MASM(masm)
18 18
19 19
20 void Builtins::Generate_Adaptor(MacroAssembler* masm, CFunctionId id) { 20 void Builtins::Generate_Adaptor(MacroAssembler* masm, CFunctionId id,
21 ExitFrameType exit_frame_type) {
21 // ----------- S t a t e ------------- 22 // ----------- S t a t e -------------
22 // -- r3 : number of arguments excluding receiver 23 // -- r3 : number of arguments excluding receiver
23 // -- r4 : target 24 // -- r4 : target
24 // -- r6 : new.target 25 // -- r6 : new.target
25 // -- sp[0] : last argument 26 // -- sp[0] : last argument
26 // -- ... 27 // -- ...
27 // -- sp[4 * (argc - 1)] : first argument 28 // -- sp[4 * (argc - 1)] : first argument
28 // -- sp[4 * argc] : receiver 29 // -- sp[4 * argc] : receiver
29 // ----------------------------------- 30 // -----------------------------------
30 __ AssertFunction(r4); 31 __ AssertFunction(r4);
31 32
32 // Make sure we operate in the context of the called function (for example 33 // Make sure we operate in the context of the called function (for example
33 // ConstructStubs implemented in C++ will be run in the context of the caller 34 // ConstructStubs implemented in C++ will be run in the context of the caller
34 // instead of the callee, due to the way that [[Construct]] is defined for 35 // instead of the callee, due to the way that [[Construct]] is defined for
35 // ordinary functions). 36 // ordinary functions).
36 __ LoadP(cp, FieldMemOperand(r4, JSFunction::kContextOffset)); 37 __ LoadP(cp, FieldMemOperand(r4, JSFunction::kContextOffset));
37 38
38 // Insert extra arguments. 39 // Insert extra arguments.
39 const int num_extra_args = 2; 40 const int num_extra_args = 2;
40 __ Push(r4, r6); 41 __ Push(r4, r6);
41 42
42 // JumpToExternalReference expects r3 to contain the number of arguments 43 // JumpToExternalReference expects r3 to contain the number of arguments
43 // including the receiver and the extra arguments. 44 // including the receiver and the extra arguments.
44 __ addi(r3, r3, Operand(num_extra_args + 1)); 45 __ addi(r3, r3, Operand(num_extra_args + 1));
45 46
46 __ JumpToExternalReference(ExternalReference(id, masm->isolate())); 47 __ JumpToExternalReference(ExternalReference(id, masm->isolate()),
48 exit_frame_type == BUILTIN_EXIT);
47 } 49 }
48 50
49 51
50 // Load the built-in InternalArray function from the current context. 52 // Load the built-in InternalArray function from the current context.
51 static void GenerateLoadInternalArrayFunction(MacroAssembler* masm, 53 static void GenerateLoadInternalArrayFunction(MacroAssembler* masm,
52 Register result) { 54 Register result) {
53 // Load the InternalArray function from the current native context. 55 // Load the InternalArray function from the current native context.
54 __ LoadNativeContextSlot(Context::INTERNAL_ARRAY_FUNCTION_INDEX, result); 56 __ LoadNativeContextSlot(Context::INTERNAL_ARRAY_FUNCTION_INDEX, result);
55 } 57 }
56 58
(...skipping 2903 matching lines...) Expand 10 before | Expand all | Expand 10 after
2960 __ bkpt(0); 2962 __ bkpt(0);
2961 } 2963 }
2962 } 2964 }
2963 2965
2964 2966
2965 #undef __ 2967 #undef __
2966 } // namespace internal 2968 } // namespace internal
2967 } // namespace v8 2969 } // namespace v8
2968 2970
2969 #endif // V8_TARGET_ARCH_PPC 2971 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « no previous file | src/ppc/code-stubs-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698