OLD | NEW |
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 16 matching lines...) Expand all Loading... |
27 // -- sp[4 * argc] : receiver | 27 // -- sp[4 * argc] : receiver |
28 // ----------------------------------- | 28 // ----------------------------------- |
29 __ AssertFunction(r3); | 29 __ AssertFunction(r3); |
30 | 30 |
31 // 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 |
32 // 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 |
33 // 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 |
34 // ordinary functions). | 34 // ordinary functions). |
35 __ LoadP(cp, FieldMemOperand(r3, JSFunction::kContextOffset)); | 35 __ LoadP(cp, FieldMemOperand(r3, JSFunction::kContextOffset)); |
36 | 36 |
37 // Insert extra arguments. | |
38 const int num_extra_args = 2; | |
39 __ Push(r3, r5); | |
40 // JumpToExternalReference expects r2 to contain the number of arguments | 37 // JumpToExternalReference expects r2 to contain the number of arguments |
41 // including the receiver and the extra arguments. | 38 // including the receiver and the extra arguments. |
| 39 const int num_extra_args = 3; |
42 __ AddP(r2, r2, Operand(num_extra_args + 1)); | 40 __ AddP(r2, r2, Operand(num_extra_args + 1)); |
43 | 41 |
| 42 // Insert extra arguments. |
| 43 __ SmiTag(r2); |
| 44 __ Push(r2, r3, r5); |
| 45 __ SmiUntag(r2); |
| 46 |
44 __ JumpToExternalReference(ExternalReference(id, masm->isolate()), | 47 __ JumpToExternalReference(ExternalReference(id, masm->isolate()), |
45 exit_frame_type == BUILTIN_EXIT); | 48 exit_frame_type == BUILTIN_EXIT); |
46 } | 49 } |
47 | 50 |
48 // Load the built-in InternalArray function from the current context. | 51 // Load the built-in InternalArray function from the current context. |
49 static void GenerateLoadInternalArrayFunction(MacroAssembler* masm, | 52 static void GenerateLoadInternalArrayFunction(MacroAssembler* masm, |
50 Register result) { | 53 Register result) { |
51 // Load the InternalArray function from the current native context. | 54 // Load the InternalArray function from the current native context. |
52 __ LoadNativeContextSlot(Context::INTERNAL_ARRAY_FUNCTION_INDEX, result); | 55 __ LoadNativeContextSlot(Context::INTERNAL_ARRAY_FUNCTION_INDEX, result); |
53 } | 56 } |
(...skipping 2902 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2956 __ bkpt(0); | 2959 __ bkpt(0); |
2957 } | 2960 } |
2958 } | 2961 } |
2959 | 2962 |
2960 #undef __ | 2963 #undef __ |
2961 | 2964 |
2962 } // namespace internal | 2965 } // namespace internal |
2963 } // namespace v8 | 2966 } // namespace v8 |
2964 | 2967 |
2965 #endif // V8_TARGET_ARCH_S390 | 2968 #endif // V8_TARGET_ARCH_S390 |
OLD | NEW |