| 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 #include "src/compiler/code-generator.h" | 5 #include "src/compiler/code-generator.h" |
| 6 | 6 |
| 7 #include "src/arm64/frames-arm64.h" | 7 #include "src/arm64/frames-arm64.h" |
| 8 #include "src/arm64/macro-assembler-arm64.h" | 8 #include "src/arm64/macro-assembler-arm64.h" |
| 9 #include "src/compilation-info.h" | 9 #include "src/compilation-info.h" |
| 10 #include "src/compiler/code-generator-impl.h" | 10 #include "src/compiler/code-generator-impl.h" |
| (...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 702 __ Ldr(jssp, MemOperand(csp)); | 702 __ Ldr(jssp, MemOperand(csp)); |
| 703 __ Mov(csp, jssp); | 703 __ Mov(csp, jssp); |
| 704 } | 704 } |
| 705 if (flags & CallDescriptor::kRestoreCSP) { | 705 if (flags & CallDescriptor::kRestoreCSP) { |
| 706 __ Mov(csp, jssp); | 706 __ Mov(csp, jssp); |
| 707 __ AssertCspAligned(); | 707 __ AssertCspAligned(); |
| 708 } | 708 } |
| 709 frame_access_state()->ClearSPDelta(); | 709 frame_access_state()->ClearSPDelta(); |
| 710 break; | 710 break; |
| 711 } | 711 } |
| 712 case kArchTailCallJSFunctionFromJSFunction: | 712 case kArchTailCallJSFunctionFromJSFunction: { |
| 713 case kArchTailCallJSFunction: { | |
| 714 Register func = i.InputRegister(0); | 713 Register func = i.InputRegister(0); |
| 715 if (FLAG_debug_code) { | 714 if (FLAG_debug_code) { |
| 716 // Check the function's context matches the context argument. | 715 // Check the function's context matches the context argument. |
| 717 UseScratchRegisterScope scope(masm()); | 716 UseScratchRegisterScope scope(masm()); |
| 718 Register temp = scope.AcquireX(); | 717 Register temp = scope.AcquireX(); |
| 719 __ Ldr(temp, FieldMemOperand(func, JSFunction::kContextOffset)); | 718 __ Ldr(temp, FieldMemOperand(func, JSFunction::kContextOffset)); |
| 720 __ cmp(cp, temp); | 719 __ cmp(cp, temp); |
| 721 __ Assert(eq, kWrongFunctionContext); | 720 __ Assert(eq, kWrongFunctionContext); |
| 722 } | 721 } |
| 723 if (arch_opcode == kArchTailCallJSFunctionFromJSFunction) { | 722 AssemblePopArgumentsAdaptorFrame(kJavaScriptCallArgCountRegister, |
| 724 AssemblePopArgumentsAdaptorFrame(kJavaScriptCallArgCountRegister, | 723 i.TempRegister(0), i.TempRegister(1), |
| 725 i.TempRegister(0), i.TempRegister(1), | 724 i.TempRegister(2)); |
| 726 i.TempRegister(2)); | |
| 727 } | |
| 728 __ Ldr(x10, FieldMemOperand(func, JSFunction::kCodeEntryOffset)); | 725 __ Ldr(x10, FieldMemOperand(func, JSFunction::kCodeEntryOffset)); |
| 729 __ Jump(x10); | 726 __ Jump(x10); |
| 730 frame_access_state()->ClearSPDelta(); | 727 frame_access_state()->ClearSPDelta(); |
| 731 frame_access_state()->SetFrameAccessToDefault(); | 728 frame_access_state()->SetFrameAccessToDefault(); |
| 732 break; | 729 break; |
| 733 } | 730 } |
| 734 case kArchPrepareCallCFunction: | 731 case kArchPrepareCallCFunction: |
| 735 // We don't need kArchPrepareCallCFunction on arm64 as the instruction | 732 // We don't need kArchPrepareCallCFunction on arm64 as the instruction |
| 736 // selector already perform a Claim to reserve space on the stack and | 733 // selector already perform a Claim to reserve space on the stack and |
| 737 // guarantee correct alignment of stack pointer. | 734 // guarantee correct alignment of stack pointer. |
| (...skipping 1350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2088 padding_size -= kInstructionSize; | 2085 padding_size -= kInstructionSize; |
| 2089 } | 2086 } |
| 2090 } | 2087 } |
| 2091 } | 2088 } |
| 2092 | 2089 |
| 2093 #undef __ | 2090 #undef __ |
| 2094 | 2091 |
| 2095 } // namespace compiler | 2092 } // namespace compiler |
| 2096 } // namespace internal | 2093 } // namespace internal |
| 2097 } // namespace v8 | 2094 } // namespace v8 |
| OLD | NEW |