| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_ARM64 | 5 #if V8_TARGET_ARCH_ARM64 |
| 6 | 6 |
| 7 #include "src/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
| 8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
| 9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
| 10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
| (...skipping 2720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2731 | 2731 |
| 2732 // Load function and argument count into x1 and x0. | 2732 // Load function and argument count into x1 and x0. |
| 2733 __ Mov(x0, arg_count); | 2733 __ Mov(x0, arg_count); |
| 2734 __ Peek(x1, arg_count * kXRegSize); | 2734 __ Peek(x1, arg_count * kXRegSize); |
| 2735 | 2735 |
| 2736 // Record call targets in unoptimized code. | 2736 // Record call targets in unoptimized code. |
| 2737 __ EmitLoadTypeFeedbackVector(x2); | 2737 __ EmitLoadTypeFeedbackVector(x2); |
| 2738 __ Mov(x3, SmiFromSlot(expr->CallNewFeedbackSlot())); | 2738 __ Mov(x3, SmiFromSlot(expr->CallNewFeedbackSlot())); |
| 2739 | 2739 |
| 2740 CallConstructStub stub(isolate()); | 2740 CallConstructStub stub(isolate()); |
| 2741 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); | 2741 __ Call(stub.GetCode(), RelocInfo::CODE_TARGET); |
| 2742 PrepareForBailoutForId(expr->ReturnId(), TOS_REG); | 2742 PrepareForBailoutForId(expr->ReturnId(), TOS_REG); |
| 2743 // Restore context register. | 2743 // Restore context register. |
| 2744 __ Ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 2744 __ Ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
| 2745 context()->Plug(x0); | 2745 context()->Plug(x0); |
| 2746 } | 2746 } |
| 2747 | 2747 |
| 2748 | 2748 |
| 2749 void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) { | 2749 void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) { |
| 2750 SuperCallReference* super_call_ref = | 2750 SuperCallReference* super_call_ref = |
| 2751 expr->expression()->AsSuperCallReference(); | 2751 expr->expression()->AsSuperCallReference(); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 2766 SetConstructCallPosition(expr, arg_count); | 2766 SetConstructCallPosition(expr, arg_count); |
| 2767 | 2767 |
| 2768 // Load new target into x3. | 2768 // Load new target into x3. |
| 2769 VisitForAccumulatorValue(super_call_ref->new_target_var()); | 2769 VisitForAccumulatorValue(super_call_ref->new_target_var()); |
| 2770 __ Mov(x3, result_register()); | 2770 __ Mov(x3, result_register()); |
| 2771 | 2771 |
| 2772 // Load function and argument count into x1 and x0. | 2772 // Load function and argument count into x1 and x0. |
| 2773 __ Mov(x0, arg_count); | 2773 __ Mov(x0, arg_count); |
| 2774 __ Peek(x1, arg_count * kXRegSize); | 2774 __ Peek(x1, arg_count * kXRegSize); |
| 2775 | 2775 |
| 2776 __ Call(isolate()->builtins()->Construct(), RelocInfo::CONSTRUCT_CALL); | 2776 __ Call(isolate()->builtins()->Construct(), RelocInfo::CODE_TARGET); |
| 2777 | 2777 |
| 2778 RecordJSReturnSite(expr); | 2778 RecordJSReturnSite(expr); |
| 2779 | 2779 |
| 2780 // Restore context register. | 2780 // Restore context register. |
| 2781 __ Ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 2781 __ Ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
| 2782 context()->Plug(x0); | 2782 context()->Plug(x0); |
| 2783 } | 2783 } |
| 2784 | 2784 |
| 2785 | 2785 |
| 2786 void FullCodeGenerator::EmitIsSmi(CallRuntime* expr) { | 2786 void FullCodeGenerator::EmitIsSmi(CallRuntime* expr) { |
| (...skipping 737 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3524 // Pre-decrement x11 with kPointerSize on each iteration. | 3524 // Pre-decrement x11 with kPointerSize on each iteration. |
| 3525 // Pre-decrement in order to skip receiver. | 3525 // Pre-decrement in order to skip receiver. |
| 3526 __ Ldr(x10, MemOperand(x11, -kPointerSize, PreIndex)); | 3526 __ Ldr(x10, MemOperand(x11, -kPointerSize, PreIndex)); |
| 3527 __ Push(x10); | 3527 __ Push(x10); |
| 3528 __ Sub(x1, x1, Operand(1)); | 3528 __ Sub(x1, x1, Operand(1)); |
| 3529 __ Cbnz(x1, &loop); | 3529 __ Cbnz(x1, &loop); |
| 3530 } | 3530 } |
| 3531 | 3531 |
| 3532 __ bind(&args_set_up); | 3532 __ bind(&args_set_up); |
| 3533 __ Peek(x1, Operand(x0, LSL, kPointerSizeLog2)); | 3533 __ Peek(x1, Operand(x0, LSL, kPointerSizeLog2)); |
| 3534 __ Call(isolate()->builtins()->Construct(), RelocInfo::CONSTRUCT_CALL); | 3534 __ Call(isolate()->builtins()->Construct(), RelocInfo::CODE_TARGET); |
| 3535 | 3535 |
| 3536 // Restore context register. | 3536 // Restore context register. |
| 3537 __ Ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 3537 __ Ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
| 3538 | 3538 |
| 3539 context()->DropAndPlug(1, x0); | 3539 context()->DropAndPlug(1, x0); |
| 3540 } | 3540 } |
| 3541 | 3541 |
| 3542 | 3542 |
| 3543 void FullCodeGenerator::EmitHasCachedArrayIndex(CallRuntime* expr) { | 3543 void FullCodeGenerator::EmitHasCachedArrayIndex(CallRuntime* expr) { |
| 3544 ZoneList<Expression*>* args = expr->arguments(); | 3544 ZoneList<Expression*>* args = expr->arguments(); |
| (...skipping 1437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4982 } | 4982 } |
| 4983 | 4983 |
| 4984 return INTERRUPT; | 4984 return INTERRUPT; |
| 4985 } | 4985 } |
| 4986 | 4986 |
| 4987 | 4987 |
| 4988 } // namespace internal | 4988 } // namespace internal |
| 4989 } // namespace v8 | 4989 } // namespace v8 |
| 4990 | 4990 |
| 4991 #endif // V8_TARGET_ARCH_ARM64 | 4991 #endif // V8_TARGET_ARCH_ARM64 |
| OLD | NEW |