OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009, 2013 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2013 Apple Inc. All rights reserved. |
3 * Copyright (C) 2007-2009 Torch Mobile, Inc. | 3 * Copyright (C) 2007-2009 Torch Mobile, Inc. |
4 * Copyright (C) 2010, 2011 Research In Motion Limited. All rights reserved. | 4 * Copyright (C) 2010, 2011 Research In Motion Limited. All rights reserved. |
5 * Copyright (C) 2013 Samsung Electronics. All rights reserved. | 5 * Copyright (C) 2013 Samsung Electronics. All rights reserved. |
6 * | 6 * |
7 * Redistribution and use in source and binary forms, with or without | 7 * Redistribution and use in source and binary forms, with or without |
8 * modification, are permitted provided that the following conditions | 8 * modification, are permitted provided that the following conditions |
9 * are met: | 9 * are met: |
10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
(...skipping 20 matching lines...) Expand all Loading... |
31 | 31 |
32 #include "wtf/Compiler.h" | 32 #include "wtf/Compiler.h" |
33 | 33 |
34 /* CPU() - the target CPU architecture */ | 34 /* CPU() - the target CPU architecture */ |
35 #define CPU(WTF_FEATURE) (defined WTF_CPU_##WTF_FEATURE && WTF_CPU_##WTF_FEATUR
E) | 35 #define CPU(WTF_FEATURE) (defined WTF_CPU_##WTF_FEATURE && WTF_CPU_##WTF_FEATUR
E) |
36 | 36 |
37 /* ==== CPU() - the target CPU architecture ==== */ | 37 /* ==== CPU() - the target CPU architecture ==== */ |
38 | 38 |
39 /* This also defines CPU(BIG_ENDIAN) or CPU(MIDDLE_ENDIAN) or neither, as approp
riate. */ | 39 /* This also defines CPU(BIG_ENDIAN) or CPU(MIDDLE_ENDIAN) or neither, as approp
riate. */ |
40 | 40 |
41 /* CPU(ALPHA) - DEC Alpha */ | |
42 #if defined(__alpha__) | |
43 #define WTF_CPU_ALPHA 1 | |
44 #endif | |
45 | |
46 /* CPU(IA64) - Itanium / IA-64 */ | |
47 #if defined(__ia64__) | |
48 #define WTF_CPU_IA64 1 | |
49 #endif | |
50 | |
51 /* CPU(MIPS) - MIPS 32-bit */ | |
52 /* Note: Only O32 ABI is tested, so we enable it for O32 ABI for now. */ | |
53 #if (defined(mips) || defined(__mips__) || defined(MIPS) || defined(_MIPS_)) \ | |
54 && defined(_ABIO32) | |
55 #define WTF_CPU_MIPS 1 | |
56 #if defined(__MIPSEB__) | |
57 #define WTF_CPU_BIG_ENDIAN 1 | |
58 #endif | |
59 /* MIPS requires allocators to use aligned memory */ | |
60 #define WTF_USE_ARENA_ALLOC_ALIGNMENT_INTEGER 1 | |
61 #endif /* MIPS */ | |
62 | |
63 /* CPU(PPC) - PowerPC 32-bit */ | |
64 #if defined(__ppc__) \ | |
65 || defined(__PPC__) \ | |
66 || defined(__powerpc__) \ | |
67 || defined(__powerpc) \ | |
68 || defined(__POWERPC__) \ | |
69 || defined(_M_PPC) \ | |
70 || defined(__PPC) | |
71 #define WTF_CPU_PPC 1 | |
72 #define WTF_CPU_BIG_ENDIAN 1 | |
73 #endif | |
74 | |
75 /* CPU(PPC64) - PowerPC 64-bit */ | |
76 #if defined(__ppc64__) \ | |
77 || defined(__PPC64__) | |
78 #define WTF_CPU_PPC64 1 | |
79 #define WTF_CPU_BIG_ENDIAN 1 | |
80 #endif | |
81 | |
82 /* CPU(SH4) - SuperH SH-4 */ | |
83 #if defined(__SH4__) | |
84 #define WTF_CPU_SH4 1 | |
85 #endif | |
86 | |
87 /* CPU(SPARC32) - SPARC 32-bit */ | |
88 #if defined(__sparc) && !defined(__arch64__) || defined(__sparcv8) | |
89 #define WTF_CPU_SPARC32 1 | |
90 #define WTF_CPU_BIG_ENDIAN 1 | |
91 #endif | |
92 | |
93 /* CPU(SPARC64) - SPARC 64-bit */ | |
94 #if defined(__sparc__) && defined(__arch64__) || defined (__sparcv9) | |
95 #define WTF_CPU_SPARC64 1 | |
96 #define WTF_CPU_BIG_ENDIAN 1 | |
97 #endif | |
98 | |
99 /* CPU(SPARC) - any SPARC, true for CPU(SPARC32) and CPU(SPARC64) */ | |
100 #if CPU(SPARC32) || CPU(SPARC64) | |
101 #define WTF_CPU_SPARC 1 | |
102 #endif | |
103 | |
104 /* CPU(S390X) - S390 64-bit */ | |
105 #if defined(__s390x__) | |
106 #define WTF_CPU_S390X 1 | |
107 #define WTF_CPU_BIG_ENDIAN 1 | |
108 #endif | |
109 | |
110 /* CPU(S390) - S390 32-bit */ | |
111 #if defined(__s390__) | |
112 #define WTF_CPU_S390 1 | |
113 #define WTF_CPU_BIG_ENDIAN 1 | |
114 #endif | |
115 | |
116 /* CPU(X86) - i386 / x86 32-bit */ | 41 /* CPU(X86) - i386 / x86 32-bit */ |
117 #if defined(__i386__) \ | 42 #if defined(__i386__) \ |
118 || defined(i386) \ | 43 || defined(i386) \ |
119 || defined(_M_IX86) \ | 44 || defined(_M_IX86) \ |
120 || defined(_X86_) \ | 45 || defined(_X86_) \ |
121 || defined(__THW_INTEL) | 46 || defined(__THW_INTEL) |
122 #define WTF_CPU_X86 1 | 47 #define WTF_CPU_X86 1 |
123 #endif | 48 #endif |
124 | 49 |
125 /* CPU(X86_64) - AMD64 / Intel64 / x86_64 64-bit */ | 50 /* CPU(X86_64) - AMD64 / Intel64 / x86_64 64-bit */ |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 | 82 |
158 #elif defined(__ARM_ARCH_5__) \ | 83 #elif defined(__ARM_ARCH_5__) \ |
159 || defined(__ARM_ARCH_5T__) \ | 84 || defined(__ARM_ARCH_5T__) \ |
160 || defined(__MARM_ARMV5__) | 85 || defined(__MARM_ARMV5__) |
161 #define WTF_ARM_ARCH_VERSION 5 | 86 #define WTF_ARM_ARCH_VERSION 5 |
162 | 87 |
163 #elif defined(__ARM_ARCH_5E__) \ | 88 #elif defined(__ARM_ARCH_5E__) \ |
164 || defined(__ARM_ARCH_5TE__) \ | 89 || defined(__ARM_ARCH_5TE__) \ |
165 || defined(__ARM_ARCH_5TEJ__) | 90 || defined(__ARM_ARCH_5TEJ__) |
166 #define WTF_ARM_ARCH_VERSION 5 | 91 #define WTF_ARM_ARCH_VERSION 5 |
167 /*ARMv5TE requires allocators to use aligned memory*/ | |
168 #define WTF_USE_ARENA_ALLOC_ALIGNMENT_INTEGER 1 | |
169 | 92 |
170 #elif defined(__ARM_ARCH_6__) \ | 93 #elif defined(__ARM_ARCH_6__) \ |
171 || defined(__ARM_ARCH_6J__) \ | 94 || defined(__ARM_ARCH_6J__) \ |
172 || defined(__ARM_ARCH_6K__) \ | 95 || defined(__ARM_ARCH_6K__) \ |
173 || defined(__ARM_ARCH_6Z__) \ | 96 || defined(__ARM_ARCH_6Z__) \ |
174 || defined(__ARM_ARCH_6ZK__) \ | 97 || defined(__ARM_ARCH_6ZK__) \ |
175 || defined(__ARM_ARCH_6T2__) \ | 98 || defined(__ARM_ARCH_6T2__) \ |
176 || defined(__ARMV6__) | 99 || defined(__ARMV6__) |
177 #define WTF_ARM_ARCH_VERSION 6 | 100 #define WTF_ARM_ARCH_VERSION 6 |
178 | 101 |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 #define HAVE_ARM_NEON_INTRINSICS 1 | 168 #define HAVE_ARM_NEON_INTRINSICS 1 |
246 #endif | 169 #endif |
247 | 170 |
248 #if defined(__ARM_ARCH_7S__) | 171 #if defined(__ARM_ARCH_7S__) |
249 #define WTF_CPU_APPLE_ARMV7S 1 | 172 #define WTF_CPU_APPLE_ARMV7S 1 |
250 #endif | 173 #endif |
251 | 174 |
252 #endif /* ARM */ | 175 #endif /* ARM */ |
253 | 176 |
254 #endif /* WTF_CPU_h */ | 177 #endif /* WTF_CPU_h */ |
OLD | NEW |