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 18 matching lines...) Expand all Loading... |
29 #ifndef WTF_CPU_h | 29 #ifndef WTF_CPU_h |
30 #define WTF_CPU_h | 30 #define WTF_CPU_h |
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 defines CPU(BIG_ENDIAN) or nothing, as appropriate. */ |
| 40 /* This defines CPU(32BIT) or CPU(64BIT), as appropriate. */ |
40 | 41 |
41 /* CPU(X86) - i386 / x86 32-bit */ | 42 /* CPU(X86) - i386 / x86 32-bit */ |
42 #if defined(__i386__) \ | 43 #if defined(__i386__) \ |
43 || defined(i386) \ | 44 || defined(i386) \ |
44 || defined(_M_IX86) \ | 45 || defined(_M_IX86) \ |
45 || defined(_X86_) \ | 46 || defined(_X86_) \ |
46 || defined(__THW_INTEL) | 47 || defined(__THW_INTEL) |
47 #define WTF_CPU_X86 1 | 48 #define WTF_CPU_X86 1 |
48 #endif | 49 #endif |
49 | 50 |
50 /* CPU(X86_64) - AMD64 / Intel64 / x86_64 64-bit */ | 51 /* CPU(X86_64) - AMD64 / Intel64 / x86_64 64-bit */ |
51 #if defined(__x86_64__) \ | 52 #if defined(__x86_64__) \ |
52 || defined(_M_X64) | 53 || defined(_M_X64) |
53 #define WTF_CPU_X86_64 1 | 54 #define WTF_CPU_X86_64 1 |
| 55 #define WTF_CPU_64BIT 1 |
54 #endif | 56 #endif |
55 | 57 |
56 /* CPU(ARM) - ARM, any version*/ | 58 /* CPU(ARM) - ARM, any version*/ |
57 #define WTF_ARM_ARCH_AT_LEAST(N) (CPU(ARM) && defined(WTF_ARM_ARCH_VERSION) && W
TF_ARM_ARCH_VERSION >= N) | 59 #define WTF_ARM_ARCH_AT_LEAST(N) (CPU(ARM) && defined(WTF_ARM_ARCH_VERSION) && W
TF_ARM_ARCH_VERSION >= N) |
58 | 60 |
59 #if defined(arm) \ | 61 #if defined(arm) \ |
60 || defined(__arm__) \ | 62 || defined(__arm__) \ |
61 || defined(ARM) \ | 63 || defined(ARM) \ |
62 || defined(_ARM_) | 64 || defined(_ARM_) |
63 #define WTF_CPU_ARM 1 | 65 #define WTF_CPU_ARM 1 |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 | 167 |
166 #if CPU(ARM_NEON) && (!COMPILER(GCC) || GCC_VERSION_AT_LEAST(4, 7, 0)) | 168 #if CPU(ARM_NEON) && (!COMPILER(GCC) || GCC_VERSION_AT_LEAST(4, 7, 0)) |
167 // All NEON intrinsics usage can be disabled by this macro. | 169 // All NEON intrinsics usage can be disabled by this macro. |
168 #define HAVE_ARM_NEON_INTRINSICS 1 | 170 #define HAVE_ARM_NEON_INTRINSICS 1 |
169 #endif | 171 #endif |
170 | 172 |
171 #if defined(__ARM_ARCH_7S__) | 173 #if defined(__ARM_ARCH_7S__) |
172 #define WTF_CPU_APPLE_ARMV7S 1 | 174 #define WTF_CPU_APPLE_ARMV7S 1 |
173 #endif | 175 #endif |
174 | 176 |
| 177 #if !defined(WTF_CPU_64BIT) |
| 178 #define WTF_CPU_32BIT 1 |
| 179 #endif |
| 180 |
175 #endif /* ARM */ | 181 #endif /* ARM */ |
176 | 182 |
177 #endif /* WTF_CPU_h */ | 183 #endif /* WTF_CPU_h */ |
OLD | NEW |