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/ast/scopes.h" | 9 #include "src/ast/scopes.h" |
10 #include "src/compiler/code-generator-impl.h" | 10 #include "src/compiler/code-generator-impl.h" |
(...skipping 915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
926 case kArm64TestAndBranch32: | 926 case kArm64TestAndBranch32: |
927 case kArm64TestAndBranch: | 927 case kArm64TestAndBranch: |
928 // Pseudo instructions turned into tbz/tbnz in AssembleArchBranch. | 928 // Pseudo instructions turned into tbz/tbnz in AssembleArchBranch. |
929 break; | 929 break; |
930 case kArm64CompareAndBranch32: | 930 case kArm64CompareAndBranch32: |
931 // Pseudo instruction turned into cbz/cbnz in AssembleArchBranch. | 931 // Pseudo instruction turned into cbz/cbnz in AssembleArchBranch. |
932 break; | 932 break; |
933 case kArm64ClaimCSP: { | 933 case kArm64ClaimCSP: { |
934 int count = i.InputInt32(0); | 934 int count = i.InputInt32(0); |
935 Register prev = __ StackPointer(); | 935 Register prev = __ StackPointer(); |
936 __ SetStackPointer(csp); | 936 if (prev.Is(jssp)) { |
937 __ Claim(count); | 937 __ AlignAndSetCSPForFrame(); |
| 938 } |
| 939 if (count > 0) { |
| 940 __ Claim(count); |
| 941 } |
938 __ SetStackPointer(prev); | 942 __ SetStackPointer(prev); |
939 frame_access_state()->IncreaseSPDelta(count); | 943 frame_access_state()->IncreaseSPDelta(count); |
940 break; | 944 break; |
941 } | 945 } |
942 case kArm64ClaimJSSP: { | 946 case kArm64ClaimJSSP: { |
943 int count = i.InputInt32(0); | 947 int count = i.InputInt32(0); |
944 if (csp.Is(__ StackPointer())) { | 948 if (csp.Is(__ StackPointer())) { |
945 // No JSP is set up. Compute it from the CSP. | 949 // No JSP is set up. Compute it from the CSP. |
946 int even = RoundUp(count, 2); | 950 int even = RoundUp(count, 2); |
947 __ Sub(jssp, csp, count * kPointerSize); | 951 __ Sub(jssp, csp, count * kPointerSize); |
(...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1725 padding_size -= kInstructionSize; | 1729 padding_size -= kInstructionSize; |
1726 } | 1730 } |
1727 } | 1731 } |
1728 } | 1732 } |
1729 | 1733 |
1730 #undef __ | 1734 #undef __ |
1731 | 1735 |
1732 } // namespace compiler | 1736 } // namespace compiler |
1733 } // namespace internal | 1737 } // namespace internal |
1734 } // namespace v8 | 1738 } // namespace v8 |
OLD | NEW |