| 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 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_ARM64 | 7 #if V8_TARGET_ARCH_ARM64 |
| 8 | 8 |
| 9 #include "src/base/bits.h" |
| 9 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
| 10 #include "src/codegen.h" | 11 #include "src/codegen.h" |
| 11 #include "src/cpu-profiler.h" | 12 #include "src/cpu-profiler.h" |
| 12 #include "src/debug.h" | 13 #include "src/debug.h" |
| 13 #include "src/isolate-inl.h" | 14 #include "src/isolate-inl.h" |
| 14 #include "src/runtime.h" | 15 #include "src/runtime.h" |
| 15 | 16 |
| 16 namespace v8 { | 17 namespace v8 { |
| 17 namespace internal { | 18 namespace internal { |
| 18 | 19 |
| (...skipping 2033 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2052 | 2053 |
| 2053 // If the stack pointer is not csp, we need to derive an aligned csp from the | 2054 // If the stack pointer is not csp, we need to derive an aligned csp from the |
| 2054 // current stack pointer. | 2055 // current stack pointer. |
| 2055 const Register old_stack_pointer = StackPointer(); | 2056 const Register old_stack_pointer = StackPointer(); |
| 2056 if (!csp.Is(old_stack_pointer)) { | 2057 if (!csp.Is(old_stack_pointer)) { |
| 2057 AssertStackConsistency(); | 2058 AssertStackConsistency(); |
| 2058 | 2059 |
| 2059 int sp_alignment = ActivationFrameAlignment(); | 2060 int sp_alignment = ActivationFrameAlignment(); |
| 2060 // The ABI mandates at least 16-byte alignment. | 2061 // The ABI mandates at least 16-byte alignment. |
| 2061 DCHECK(sp_alignment >= 16); | 2062 DCHECK(sp_alignment >= 16); |
| 2062 DCHECK(IsPowerOf2(sp_alignment)); | 2063 DCHECK(base::bits::IsPowerOfTwo32(sp_alignment)); |
| 2063 | 2064 |
| 2064 // The current stack pointer is a callee saved register, and is preserved | 2065 // The current stack pointer is a callee saved register, and is preserved |
| 2065 // across the call. | 2066 // across the call. |
| 2066 DCHECK(kCalleeSaved.IncludesAliasOf(old_stack_pointer)); | 2067 DCHECK(kCalleeSaved.IncludesAliasOf(old_stack_pointer)); |
| 2067 | 2068 |
| 2068 // Align and synchronize the system stack pointer with jssp. | 2069 // Align and synchronize the system stack pointer with jssp. |
| 2069 Bic(csp, old_stack_pointer, sp_alignment - 1); | 2070 Bic(csp, old_stack_pointer, sp_alignment - 1); |
| 2070 SetStackPointer(csp); | 2071 SetStackPointer(csp); |
| 2071 } | 2072 } |
| 2072 | 2073 |
| (...skipping 3351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5424 } | 5425 } |
| 5425 } | 5426 } |
| 5426 | 5427 |
| 5427 | 5428 |
| 5428 #undef __ | 5429 #undef __ |
| 5429 | 5430 |
| 5430 | 5431 |
| 5431 } } // namespace v8::internal | 5432 } } // namespace v8::internal |
| 5432 | 5433 |
| 5433 #endif // V8_TARGET_ARCH_ARM64 | 5434 #endif // V8_TARGET_ARCH_ARM64 |
| OLD | NEW |