OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_GLOBALS_H_ | 5 #ifndef V8_GLOBALS_H_ |
6 #define V8_GLOBALS_H_ | 6 #define V8_GLOBALS_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 | 117 |
118 const int kCharSize = sizeof(char); // NOLINT | 118 const int kCharSize = sizeof(char); // NOLINT |
119 const int kShortSize = sizeof(short); // NOLINT | 119 const int kShortSize = sizeof(short); // NOLINT |
120 const int kIntSize = sizeof(int); // NOLINT | 120 const int kIntSize = sizeof(int); // NOLINT |
121 const int kInt32Size = sizeof(int32_t); // NOLINT | 121 const int kInt32Size = sizeof(int32_t); // NOLINT |
122 const int kInt64Size = sizeof(int64_t); // NOLINT | 122 const int kInt64Size = sizeof(int64_t); // NOLINT |
123 const int kFloatSize = sizeof(float); // NOLINT | 123 const int kFloatSize = sizeof(float); // NOLINT |
124 const int kDoubleSize = sizeof(double); // NOLINT | 124 const int kDoubleSize = sizeof(double); // NOLINT |
125 const int kIntptrSize = sizeof(intptr_t); // NOLINT | 125 const int kIntptrSize = sizeof(intptr_t); // NOLINT |
126 const int kPointerSize = sizeof(void*); // NOLINT | 126 const int kPointerSize = sizeof(void*); // NOLINT |
127 #if V8_TARGET_ARCH_ARM64 | |
128 const int kFrameAlignmentInBytes = 2 * kPointerSize; | |
129 #else | |
130 const int kFrameAlignmentInBytes = kPointerSize; | |
131 #endif | |
132 #if V8_TARGET_ARCH_X64 && V8_TARGET_ARCH_32_BIT | 127 #if V8_TARGET_ARCH_X64 && V8_TARGET_ARCH_32_BIT |
133 const int kRegisterSize = kPointerSize + kPointerSize; | 128 const int kRegisterSize = kPointerSize + kPointerSize; |
134 #else | 129 #else |
135 const int kRegisterSize = kPointerSize; | 130 const int kRegisterSize = kPointerSize; |
136 #endif | 131 #endif |
137 const int kPCOnStackSize = kRegisterSize; | 132 const int kPCOnStackSize = kRegisterSize; |
138 const int kFPOnStackSize = kRegisterSize; | 133 const int kFPOnStackSize = kRegisterSize; |
139 | 134 |
140 #if V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X87 | 135 #if V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X87 |
141 const int kElidedFrameSlots = kPCOnStackSize / kPointerSize; | 136 const int kElidedFrameSlots = kPCOnStackSize / kPointerSize; |
(...skipping 897 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1039 return static_cast<uint32_t>(bit_cast<uintptr_t>(address) >> | 1034 return static_cast<uint32_t>(bit_cast<uintptr_t>(address) >> |
1040 kPointerSizeLog2); | 1035 kPointerSizeLog2); |
1041 } | 1036 } |
1042 | 1037 |
1043 } // namespace internal | 1038 } // namespace internal |
1044 } // namespace v8 | 1039 } // namespace v8 |
1045 | 1040 |
1046 namespace i = v8::internal; | 1041 namespace i = v8::internal; |
1047 | 1042 |
1048 #endif // V8_GLOBALS_H_ | 1043 #endif // V8_GLOBALS_H_ |
OLD | NEW |