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 "include/v8stdint.h" | 8 #include "include/v8stdint.h" |
9 | 9 |
10 #include "src/base/build_config.h" | 10 #include "src/base/build_config.h" |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 #if V8_TARGET_ARCH_X64 && V8_TARGET_ARCH_32_BIT | 161 #if V8_TARGET_ARCH_X64 && V8_TARGET_ARCH_32_BIT |
162 // x32 port also requires code range. | 162 // x32 port also requires code range. |
163 const bool kRequiresCodeRange = true; | 163 const bool kRequiresCodeRange = true; |
164 const size_t kMaximalCodeRangeSize = 256 * MB; | 164 const size_t kMaximalCodeRangeSize = 256 * MB; |
165 #else | 165 #else |
166 const bool kRequiresCodeRange = false; | 166 const bool kRequiresCodeRange = false; |
167 const size_t kMaximalCodeRangeSize = 0 * MB; | 167 const size_t kMaximalCodeRangeSize = 0 * MB; |
168 #endif | 168 #endif |
169 #endif | 169 #endif |
170 | 170 |
| 171 STATIC_ASSERT(kPointerSize == (1 << kPointerSizeLog2)); |
| 172 |
171 const int kBitsPerByte = 8; | 173 const int kBitsPerByte = 8; |
172 const int kBitsPerByteLog2 = 3; | 174 const int kBitsPerByteLog2 = 3; |
173 const int kBitsPerPointer = kPointerSize * kBitsPerByte; | 175 const int kBitsPerPointer = kPointerSize * kBitsPerByte; |
174 const int kBitsPerInt = kIntSize * kBitsPerByte; | 176 const int kBitsPerInt = kIntSize * kBitsPerByte; |
175 | 177 |
176 // IEEE 754 single precision floating point number bit layout. | 178 // IEEE 754 single precision floating point number bit layout. |
177 const uint32_t kBinary32SignMask = 0x80000000u; | 179 const uint32_t kBinary32SignMask = 0x80000000u; |
178 const uint32_t kBinary32ExponentMask = 0x7f800000u; | 180 const uint32_t kBinary32ExponentMask = 0x7f800000u; |
179 const uint32_t kBinary32MantissaMask = 0x007fffffu; | 181 const uint32_t kBinary32MantissaMask = 0x007fffffu; |
180 const int kBinary32ExponentBias = 127; | 182 const int kBinary32ExponentBias = 127; |
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
765 enum MinusZeroMode { | 767 enum MinusZeroMode { |
766 TREAT_MINUS_ZERO_AS_ZERO, | 768 TREAT_MINUS_ZERO_AS_ZERO, |
767 FAIL_ON_MINUS_ZERO | 769 FAIL_ON_MINUS_ZERO |
768 }; | 770 }; |
769 | 771 |
770 } } // namespace v8::internal | 772 } } // namespace v8::internal |
771 | 773 |
772 namespace i = v8::internal; | 774 namespace i = v8::internal; |
773 | 775 |
774 #endif // V8_GLOBALS_H_ | 776 #endif // V8_GLOBALS_H_ |
OLD | NEW |