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 578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
589 __ lay(ip, MemOperand(ip, -kPointerSize)); | 589 __ lay(ip, MemOperand(ip, -kPointerSize)); |
590 __ LoadP(r0, MemOperand(ip, r4)); | 590 __ LoadP(r0, MemOperand(ip, r4)); |
591 __ StoreP(r0, MemOperand(ip, sp)); | 591 __ StoreP(r0, MemOperand(ip, sp)); |
592 __ BranchOnCount(r1, &loop); | 592 __ BranchOnCount(r1, &loop); |
593 __ bind(&no_args); | 593 __ bind(&no_args); |
594 | 594 |
595 // Call the function. | 595 // Call the function. |
596 // r2: number of arguments | 596 // r2: number of arguments |
597 // r3: constructor function | 597 // r3: constructor function |
598 // r5: new target | 598 // r5: new target |
599 if (is_api_function) { | 599 |
600 __ LoadP(cp, FieldMemOperand(r3, JSFunction::kContextOffset)); | 600 ParameterCount actual(r2); |
601 Handle<Code> code = masm->isolate()->builtins()->HandleApiCallConstruct(); | 601 __ InvokeFunction(r3, r5, actual, CALL_FUNCTION, |
602 __ Call(code, RelocInfo::CODE_TARGET); | 602 CheckDebugStepCallWrapper()); |
603 } else { | |
604 ParameterCount actual(r2); | |
605 __ InvokeFunction(r3, r5, actual, CALL_FUNCTION, | |
606 CheckDebugStepCallWrapper()); | |
607 } | |
608 | 603 |
609 // Store offset of return address for deoptimizer. | 604 // Store offset of return address for deoptimizer. |
610 if (create_implicit_receiver && !is_api_function) { | 605 if (create_implicit_receiver && !is_api_function) { |
611 masm->isolate()->heap()->SetConstructStubDeoptPCOffset(masm->pc_offset()); | 606 masm->isolate()->heap()->SetConstructStubDeoptPCOffset(masm->pc_offset()); |
612 } | 607 } |
613 | 608 |
614 // Restore context from the frame. | 609 // Restore context from the frame. |
615 // r2: result | 610 // r2: result |
616 // sp[0]: receiver | 611 // sp[0]: receiver |
617 // sp[1]: number of arguments (smi-tagged) | 612 // sp[1]: number of arguments (smi-tagged) |
(...skipping 2208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2826 __ bkpt(0); | 2821 __ bkpt(0); |
2827 } | 2822 } |
2828 } | 2823 } |
2829 | 2824 |
2830 #undef __ | 2825 #undef __ |
2831 | 2826 |
2832 } // namespace internal | 2827 } // namespace internal |
2833 } // namespace v8 | 2828 } // namespace v8 |
2834 | 2829 |
2835 #endif // V8_TARGET_ARCH_S390 | 2830 #endif // V8_TARGET_ARCH_S390 |
OLD | NEW |