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

Side by Side Diff: src/s390/builtins-s390.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 | « src/ppc/macro-assembler-ppc.cc ('k') | src/s390/code-stubs-s390.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"
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 #define __ ACCESS_MASM(masm) 16 #define __ ACCESS_MASM(masm)
17 17
18 void Builtins::Generate_Adaptor(MacroAssembler* masm, CFunctionId id) { 18 void Builtins::Generate_Adaptor(MacroAssembler* masm, CFunctionId id,
19 ExitFrameType exit_frame_type) {
19 // ----------- S t a t e ------------- 20 // ----------- S t a t e -------------
20 // -- r2 : number of arguments excluding receiver 21 // -- r2 : number of arguments excluding receiver
21 // -- r3 : target 22 // -- r3 : target
22 // -- r5 : new.target 23 // -- r5 : new.target
23 // -- sp[0] : last argument 24 // -- sp[0] : last argument
24 // -- ... 25 // -- ...
25 // -- sp[4 * (argc - 1)] : first argument 26 // -- sp[4 * (argc - 1)] : first argument
26 // -- sp[4 * argc] : receiver 27 // -- sp[4 * argc] : receiver
27 // ----------------------------------- 28 // -----------------------------------
28 __ AssertFunction(r3); 29 __ AssertFunction(r3);
29 30
30 // Make sure we operate in the context of the called function (for example 31 // Make sure we operate in the context of the called function (for example
31 // ConstructStubs implemented in C++ will be run in the context of the caller 32 // ConstructStubs implemented in C++ will be run in the context of the caller
32 // instead of the callee, due to the way that [[Construct]] is defined for 33 // instead of the callee, due to the way that [[Construct]] is defined for
33 // ordinary functions). 34 // ordinary functions).
34 __ LoadP(cp, FieldMemOperand(r3, JSFunction::kContextOffset)); 35 __ LoadP(cp, FieldMemOperand(r3, JSFunction::kContextOffset));
35 36
36 // Insert extra arguments. 37 // Insert extra arguments.
37 const int num_extra_args = 2; 38 const int num_extra_args = 2;
38 __ Push(r3, r5); 39 __ Push(r3, r5);
39 // JumpToExternalReference expects r2 to contain the number of arguments 40 // JumpToExternalReference expects r2 to contain the number of arguments
40 // including the receiver and the extra arguments. 41 // including the receiver and the extra arguments.
41 __ AddP(r2, r2, Operand(num_extra_args + 1)); 42 __ AddP(r2, r2, Operand(num_extra_args + 1));
42 43
43 __ JumpToExternalReference(ExternalReference(id, masm->isolate())); 44 __ JumpToExternalReference(ExternalReference(id, masm->isolate()),
45 exit_frame_type == BUILTIN_EXIT);
44 } 46 }
45 47
46 // Load the built-in InternalArray function from the current context. 48 // Load the built-in InternalArray function from the current context.
47 static void GenerateLoadInternalArrayFunction(MacroAssembler* masm, 49 static void GenerateLoadInternalArrayFunction(MacroAssembler* masm,
48 Register result) { 50 Register result) {
49 // Load the InternalArray function from the current native context. 51 // Load the InternalArray function from the current native context.
50 __ LoadNativeContextSlot(Context::INTERNAL_ARRAY_FUNCTION_INDEX, result); 52 __ LoadNativeContextSlot(Context::INTERNAL_ARRAY_FUNCTION_INDEX, result);
51 } 53 }
52 54
53 // Load the built-in Array function from the current context. 55 // Load the built-in Array function from the current context.
(...skipping 2864 matching lines...) Expand 10 before | Expand all | Expand 10 after
2918 __ bkpt(0); 2920 __ bkpt(0);
2919 } 2921 }
2920 } 2922 }
2921 2923
2922 #undef __ 2924 #undef __
2923 2925
2924 } // namespace internal 2926 } // namespace internal
2925 } // namespace v8 2927 } // namespace v8
2926 2928
2927 #endif // V8_TARGET_ARCH_S390 2929 #endif // V8_TARGET_ARCH_S390
OLDNEW
« no previous file with comments | « src/ppc/macro-assembler-ppc.cc ('k') | src/s390/code-stubs-s390.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698