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

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

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/lithium-codegen-arm64.cc ('k') | src/arm64/macro-assembler-arm64.cc » ('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 #ifndef V8_ARM64_MACRO_ASSEMBLER_ARM64_H_ 5 #ifndef V8_ARM64_MACRO_ASSEMBLER_ARM64_H_
6 #define V8_ARM64_MACRO_ASSEMBLER_ARM64_H_ 6 #define V8_ARM64_MACRO_ASSEMBLER_ARM64_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "src/globals.h" 10 #include "src/globals.h"
11 11
12 #include "src/arm64/assembler-arm64-inl.h" 12 #include "src/arm64/assembler-arm64-inl.h"
13 #include "src/base/bits.h"
13 14
14 // Simulator specific helpers. 15 // Simulator specific helpers.
15 #if USE_SIMULATOR 16 #if USE_SIMULATOR
16 // TODO(all): If possible automatically prepend an indicator like 17 // TODO(all): If possible automatically prepend an indicator like
17 // UNIMPLEMENTED or LOCATION. 18 // UNIMPLEMENTED or LOCATION.
18 #define ASM_UNIMPLEMENTED(message) \ 19 #define ASM_UNIMPLEMENTED(message) \
19 __ Debug(message, __LINE__, NO_PARAM) 20 __ Debug(message, __LINE__, NO_PARAM)
20 #define ASM_UNIMPLEMENTED_BREAK(message) \ 21 #define ASM_UNIMPLEMENTED_BREAK(message) \
21 __ Debug(message, __LINE__, \ 22 __ Debug(message, __LINE__, \
22 FLAG_ignore_asm_unimplemented_break ? NO_PARAM : BREAK) 23 FLAG_ignore_asm_unimplemented_break ? NO_PARAM : BREAK)
(...skipping 778 matching lines...) Expand 10 before | Expand all | Expand 10 after
801 inline const Register& StackPointer() const { 802 inline const Register& StackPointer() const {
802 return sp_; 803 return sp_;
803 } 804 }
804 805
805 // Align csp for a frame, as per ActivationFrameAlignment, and make it the 806 // Align csp for a frame, as per ActivationFrameAlignment, and make it the
806 // current stack pointer. 807 // current stack pointer.
807 inline void AlignAndSetCSPForFrame() { 808 inline void AlignAndSetCSPForFrame() {
808 int sp_alignment = ActivationFrameAlignment(); 809 int sp_alignment = ActivationFrameAlignment();
809 // AAPCS64 mandates at least 16-byte alignment. 810 // AAPCS64 mandates at least 16-byte alignment.
810 DCHECK(sp_alignment >= 16); 811 DCHECK(sp_alignment >= 16);
811 DCHECK(IsPowerOf2(sp_alignment)); 812 DCHECK(base::bits::IsPowerOfTwo32(sp_alignment));
812 Bic(csp, StackPointer(), sp_alignment - 1); 813 Bic(csp, StackPointer(), sp_alignment - 1);
813 SetStackPointer(csp); 814 SetStackPointer(csp);
814 } 815 }
815 816
816 // Push the system stack pointer (csp) down to allow the same to be done to 817 // Push the system stack pointer (csp) down to allow the same to be done to
817 // the current stack pointer (according to StackPointer()). This must be 818 // the current stack pointer (according to StackPointer()). This must be
818 // called _before_ accessing the memory. 819 // called _before_ accessing the memory.
819 // 820 //
820 // This is necessary when pushing or otherwise adding things to the stack, to 821 // This is necessary when pushing or otherwise adding things to the stack, to
821 // satisfy the AAPCS64 constraint that the memory below the system stack 822 // satisfy the AAPCS64 constraint that the memory below the system stack
(...skipping 1532 matching lines...) Expand 10 before | Expand all | Expand 10 after
2354 #error "Unsupported option" 2355 #error "Unsupported option"
2355 #define CODE_COVERAGE_STRINGIFY(x) #x 2356 #define CODE_COVERAGE_STRINGIFY(x) #x
2356 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) 2357 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x)
2357 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) 2358 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__)
2358 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> 2359 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm->
2359 #else 2360 #else
2360 #define ACCESS_MASM(masm) masm-> 2361 #define ACCESS_MASM(masm) masm->
2361 #endif 2362 #endif
2362 2363
2363 #endif // V8_ARM64_MACRO_ASSEMBLER_ARM64_H_ 2364 #endif // V8_ARM64_MACRO_ASSEMBLER_ARM64_H_
OLDNEW
« no previous file with comments | « src/arm64/lithium-codegen-arm64.cc ('k') | src/arm64/macro-assembler-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698