Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(429)

Side by Side Diff: src/arm64/macro-assembler-arm64.cc

Issue 528993002: First step to cleanup the power-of-2 mess. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: clang-format Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/arm64/macro-assembler-arm64.h ('k') | src/arm64/macro-assembler-arm64-inl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/arm64/macro-assembler-arm64.h ('k') | src/arm64/macro-assembler-arm64-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698