| 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_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" |
| (...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 598 __ subi(ip, ip, Operand(kPointerSize)); | 598 __ subi(ip, ip, Operand(kPointerSize)); |
| 599 __ LoadPX(r0, MemOperand(r5, ip)); | 599 __ LoadPX(r0, MemOperand(r5, ip)); |
| 600 __ StorePX(r0, MemOperand(sp, ip)); | 600 __ StorePX(r0, MemOperand(sp, ip)); |
| 601 __ bdnz(&loop); | 601 __ bdnz(&loop); |
| 602 __ bind(&no_args); | 602 __ bind(&no_args); |
| 603 | 603 |
| 604 // Call the function. | 604 // Call the function. |
| 605 // r3: number of arguments | 605 // r3: number of arguments |
| 606 // r4: constructor function | 606 // r4: constructor function |
| 607 // r6: new target | 607 // r6: new target |
| 608 if (is_api_function) { | 608 |
| 609 __ LoadP(cp, FieldMemOperand(r4, JSFunction::kContextOffset)); | 609 ParameterCount actual(r3); |
| 610 Handle<Code> code = masm->isolate()->builtins()->HandleApiCallConstruct(); | 610 __ InvokeFunction(r4, r6, actual, CALL_FUNCTION, |
| 611 __ Call(code, RelocInfo::CODE_TARGET); | 611 CheckDebugStepCallWrapper()); |
| 612 } else { | |
| 613 ParameterCount actual(r3); | |
| 614 __ InvokeFunction(r4, r6, actual, CALL_FUNCTION, | |
| 615 CheckDebugStepCallWrapper()); | |
| 616 } | |
| 617 | 612 |
| 618 // Store offset of return address for deoptimizer. | 613 // Store offset of return address for deoptimizer. |
| 619 if (create_implicit_receiver && !is_api_function) { | 614 if (create_implicit_receiver && !is_api_function) { |
| 620 masm->isolate()->heap()->SetConstructStubDeoptPCOffset(masm->pc_offset()); | 615 masm->isolate()->heap()->SetConstructStubDeoptPCOffset(masm->pc_offset()); |
| 621 } | 616 } |
| 622 | 617 |
| 623 // Restore context from the frame. | 618 // Restore context from the frame. |
| 624 // r3: result | 619 // r3: result |
| 625 // sp[0]: receiver | 620 // sp[0]: receiver |
| 626 // sp[1]: number of arguments (smi-tagged) | 621 // sp[1]: number of arguments (smi-tagged) |
| (...skipping 2245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2872 __ bkpt(0); | 2867 __ bkpt(0); |
| 2873 } | 2868 } |
| 2874 } | 2869 } |
| 2875 | 2870 |
| 2876 | 2871 |
| 2877 #undef __ | 2872 #undef __ |
| 2878 } // namespace internal | 2873 } // namespace internal |
| 2879 } // namespace v8 | 2874 } // namespace v8 |
| 2880 | 2875 |
| 2881 #endif // V8_TARGET_ARCH_PPC | 2876 #endif // V8_TARGET_ARCH_PPC |
| OLD | NEW |