OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #ifndef PLATFORM_GLOBALS_H_ | 5 #ifndef PLATFORM_GLOBALS_H_ |
6 #define PLATFORM_GLOBALS_H_ | 6 #define PLATFORM_GLOBALS_H_ |
7 | 7 |
8 // __STDC_FORMAT_MACROS has to be defined before including <inttypes.h> to | 8 // __STDC_FORMAT_MACROS has to be defined before including <inttypes.h> to |
9 // enable platform independent printf format specifiers. | 9 // enable platform independent printf format specifiers. |
10 #ifndef __STDC_FORMAT_MACROS | 10 #ifndef __STDC_FORMAT_MACROS |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 | 272 |
273 // Types for native machine words. Guaranteed to be able to hold pointers and | 273 // Types for native machine words. Guaranteed to be able to hold pointers and |
274 // integers. | 274 // integers. |
275 typedef intptr_t word; | 275 typedef intptr_t word; |
276 typedef uintptr_t uword; | 276 typedef uintptr_t uword; |
277 | 277 |
278 // Byte sizes. | 278 // Byte sizes. |
279 const int kWordSize = sizeof(word); | 279 const int kWordSize = sizeof(word); |
280 const int kDoubleSize = sizeof(double); // NOLINT | 280 const int kDoubleSize = sizeof(double); // NOLINT |
281 const int kFloatSize = sizeof(float); // NOLINT | 281 const int kFloatSize = sizeof(float); // NOLINT |
| 282 const int kQuadSize = 4 * kFloatSize; |
282 const int kSimd128Size = sizeof(simd128_value_t); // NOLINT | 283 const int kSimd128Size = sizeof(simd128_value_t); // NOLINT |
283 #ifdef ARCH_IS_32_BIT | 284 #ifdef ARCH_IS_32_BIT |
284 const int kWordSizeLog2 = 2; | 285 const int kWordSizeLog2 = 2; |
285 const uword kUwordMax = kMaxUint32; | 286 const uword kUwordMax = kMaxUint32; |
286 #else | 287 #else |
287 const int kWordSizeLog2 = 3; | 288 const int kWordSizeLog2 = 3; |
288 const uword kUwordMax = kMaxUint64; | 289 const uword kUwordMax = kMaxUint64; |
289 #endif | 290 #endif |
290 | 291 |
291 // Bit sizes. | 292 // Bit sizes. |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
495 // N.B.: As the GCC manual states, "[s]ince non-static C++ methods | 496 // N.B.: As the GCC manual states, "[s]ince non-static C++ methods |
496 // have an implicit 'this' argument, the arguments of such methods | 497 // have an implicit 'this' argument, the arguments of such methods |
497 // should be counted from two, not one." | 498 // should be counted from two, not one." |
498 #define PRINTF_ATTRIBUTE(string_index, first_to_check) \ | 499 #define PRINTF_ATTRIBUTE(string_index, first_to_check) \ |
499 __attribute__((__format__(__printf__, string_index, first_to_check))) | 500 __attribute__((__format__(__printf__, string_index, first_to_check))) |
500 #else | 501 #else |
501 #define PRINTF_ATTRIBUTE(string_index, first_to_check) | 502 #define PRINTF_ATTRIBUTE(string_index, first_to_check) |
502 #endif | 503 #endif |
503 | 504 |
504 #endif // PLATFORM_GLOBALS_H_ | 505 #endif // PLATFORM_GLOBALS_H_ |
OLD | NEW |