| 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 // http://www.agner.org/optimize/calling_conventions.pdf | 116 // http://www.agner.org/optimize/calling_conventions.pdf |
| 117 // or with gcc, run: "echo | gcc -E -dM -" | 117 // or with gcc, run: "echo | gcc -E -dM -" |
| 118 #if defined(_M_X64) || defined(__x86_64__) | 118 #if defined(_M_X64) || defined(__x86_64__) |
| 119 #define HOST_ARCH_X64 1 | 119 #define HOST_ARCH_X64 1 |
| 120 #define ARCH_IS_64_BIT 1 | 120 #define ARCH_IS_64_BIT 1 |
| 121 #define kFpuRegisterSize 16 | 121 #define kFpuRegisterSize 16 |
| 122 typedef simd128_value_t fpu_register_t; | 122 typedef simd128_value_t fpu_register_t; |
| 123 #elif defined(_M_IX86) || defined(__i386__) | 123 #elif defined(_M_IX86) || defined(__i386__) |
| 124 #define HOST_ARCH_IA32 1 | 124 #define HOST_ARCH_IA32 1 |
| 125 #define ARCH_IS_32_BIT 1 | 125 #define ARCH_IS_32_BIT 1 |
| 126 #if defined(TARGET_ARCH_ARM) || defined(TARGET_ARCH_MIPS) |
| 127 #define kFpuRegisterSize 8 |
| 128 typedef double fpu_register_t; |
| 129 #else |
| 126 #define kFpuRegisterSize 16 | 130 #define kFpuRegisterSize 16 |
| 127 typedef simd128_value_t fpu_register_t; | 131 typedef simd128_value_t fpu_register_t; |
| 132 #endif |
| 128 #elif defined(__ARMEL__) | 133 #elif defined(__ARMEL__) |
| 129 #define HOST_ARCH_ARM 1 | 134 #define HOST_ARCH_ARM 1 |
| 130 #define ARCH_IS_32_BIT 1 | 135 #define ARCH_IS_32_BIT 1 |
| 131 #define kFpuRegisterSize 8 | 136 #define kFpuRegisterSize 8 |
| 132 typedef double fpu_register_t; | 137 typedef double fpu_register_t; |
| 133 typedef struct { | 138 typedef struct { |
| 134 union { | 139 union { |
| 135 uint32_t u; | 140 uint32_t u; |
| 136 float f; | 141 float f; |
| 137 } data_[4]; | 142 } data_[4]; |
| (...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 464 // N.B.: As the GCC manual states, "[s]ince non-static C++ methods | 469 // N.B.: As the GCC manual states, "[s]ince non-static C++ methods |
| 465 // have an implicit 'this' argument, the arguments of such methods | 470 // have an implicit 'this' argument, the arguments of such methods |
| 466 // should be counted from two, not one." | 471 // should be counted from two, not one." |
| 467 #define PRINTF_ATTRIBUTE(string_index, first_to_check) \ | 472 #define PRINTF_ATTRIBUTE(string_index, first_to_check) \ |
| 468 __attribute__((__format__(__printf__, string_index, first_to_check))) | 473 __attribute__((__format__(__printf__, string_index, first_to_check))) |
| 469 #else | 474 #else |
| 470 #define PRINTF_ATTRIBUTE(string_index, first_to_check) | 475 #define PRINTF_ATTRIBUTE(string_index, first_to_check) |
| 471 #endif | 476 #endif |
| 472 | 477 |
| 473 #endif // PLATFORM_GLOBALS_H_ | 478 #endif // PLATFORM_GLOBALS_H_ |
| OLD | NEW |