Index: Source/wtf/Platform.h |
diff --git a/Source/wtf/Platform.h b/Source/wtf/Platform.h |
index 183386525efd6b7ef030e58a736788f63f78a032..b409808e343b51f904174b4b6a45da5d7eb4c621 100644 |
--- a/Source/wtf/Platform.h |
+++ b/Source/wtf/Platform.h |
@@ -33,15 +33,12 @@ |
/* ==== Platform adaptation macros: these describe properties of the target environment. ==== */ |
-/* CPU() - the target CPU architecture */ |
-#define CPU(WTF_FEATURE) (defined WTF_CPU_##WTF_FEATURE && WTF_CPU_##WTF_FEATURE) |
/* HAVE() - specific system features (headers, functions or similar) that are present or not */ |
#define HAVE(WTF_FEATURE) (defined HAVE_##WTF_FEATURE && HAVE_##WTF_FEATURE) |
/* OS() - underlying operating system; only to be used for mandated low-level services like |
virtual memory, not to choose a GUI toolkit */ |
#define OS(WTF_FEATURE) (defined WTF_OS_##WTF_FEATURE && WTF_OS_##WTF_FEATURE) |
- |
/* ==== Policy decision macros: these define policy choices for a particular port. ==== */ |
/* USE() - use a particular third-party library or optional OS service */ |
@@ -49,224 +46,6 @@ |
/* ENABLE() - turn on a specific feature of WebKit */ |
#define ENABLE(WTF_FEATURE) (defined ENABLE_##WTF_FEATURE && ENABLE_##WTF_FEATURE) |
- |
-/* ==== CPU() - the target CPU architecture ==== */ |
- |
-/* This also defines CPU(BIG_ENDIAN) or CPU(MIDDLE_ENDIAN) or neither, as appropriate. */ |
- |
-/* CPU(ALPHA) - DEC Alpha */ |
-#if defined(__alpha__) |
-#define WTF_CPU_ALPHA 1 |
-#endif |
- |
-/* CPU(IA64) - Itanium / IA-64 */ |
-#if defined(__ia64__) |
-#define WTF_CPU_IA64 1 |
-#endif |
- |
-/* CPU(MIPS) - MIPS 32-bit */ |
-/* Note: Only O32 ABI is tested, so we enable it for O32 ABI for now. */ |
-#if (defined(mips) || defined(__mips__) || defined(MIPS) || defined(_MIPS_)) \ |
- && defined(_ABIO32) |
-#define WTF_CPU_MIPS 1 |
-#if defined(__MIPSEB__) |
-#define WTF_CPU_BIG_ENDIAN 1 |
-#endif |
-/* MIPS requires allocators to use aligned memory */ |
-#define WTF_USE_ARENA_ALLOC_ALIGNMENT_INTEGER 1 |
-#endif /* MIPS */ |
- |
-/* CPU(PPC) - PowerPC 32-bit */ |
-#if defined(__ppc__) \ |
- || defined(__PPC__) \ |
- || defined(__powerpc__) \ |
- || defined(__powerpc) \ |
- || defined(__POWERPC__) \ |
- || defined(_M_PPC) \ |
- || defined(__PPC) |
-#define WTF_CPU_PPC 1 |
-#define WTF_CPU_BIG_ENDIAN 1 |
-#endif |
- |
-/* CPU(PPC64) - PowerPC 64-bit */ |
-#if defined(__ppc64__) \ |
- || defined(__PPC64__) |
-#define WTF_CPU_PPC64 1 |
-#define WTF_CPU_BIG_ENDIAN 1 |
-#endif |
- |
-/* CPU(SH4) - SuperH SH-4 */ |
-#if defined(__SH4__) |
-#define WTF_CPU_SH4 1 |
-#endif |
- |
-/* CPU(SPARC32) - SPARC 32-bit */ |
-#if defined(__sparc) && !defined(__arch64__) || defined(__sparcv8) |
-#define WTF_CPU_SPARC32 1 |
-#define WTF_CPU_BIG_ENDIAN 1 |
-#endif |
- |
-/* CPU(SPARC64) - SPARC 64-bit */ |
-#if defined(__sparc__) && defined(__arch64__) || defined (__sparcv9) |
-#define WTF_CPU_SPARC64 1 |
-#define WTF_CPU_BIG_ENDIAN 1 |
-#endif |
- |
-/* CPU(SPARC) - any SPARC, true for CPU(SPARC32) and CPU(SPARC64) */ |
-#if CPU(SPARC32) || CPU(SPARC64) |
-#define WTF_CPU_SPARC 1 |
-#endif |
- |
-/* CPU(S390X) - S390 64-bit */ |
-#if defined(__s390x__) |
-#define WTF_CPU_S390X 1 |
-#define WTF_CPU_BIG_ENDIAN 1 |
-#endif |
- |
-/* CPU(S390) - S390 32-bit */ |
-#if defined(__s390__) |
-#define WTF_CPU_S390 1 |
-#define WTF_CPU_BIG_ENDIAN 1 |
-#endif |
- |
-/* CPU(X86) - i386 / x86 32-bit */ |
-#if defined(__i386__) \ |
- || defined(i386) \ |
- || defined(_M_IX86) \ |
- || defined(_X86_) \ |
- || defined(__THW_INTEL) |
-#define WTF_CPU_X86 1 |
-#endif |
- |
-/* CPU(X86_64) - AMD64 / Intel64 / x86_64 64-bit */ |
-#if defined(__x86_64__) \ |
- || defined(_M_X64) |
-#define WTF_CPU_X86_64 1 |
-#endif |
- |
-/* CPU(ARM) - ARM, any version*/ |
-#define WTF_ARM_ARCH_AT_LEAST(N) (CPU(ARM) && defined(WTF_ARM_ARCH_VERSION) && WTF_ARM_ARCH_VERSION >= N) |
- |
-#if defined(arm) \ |
- || defined(__arm__) \ |
- || defined(ARM) \ |
- || defined(_ARM_) |
-#define WTF_CPU_ARM 1 |
- |
-#if defined(__ARMEB__) |
-#define WTF_CPU_BIG_ENDIAN 1 |
- |
-#elif !defined(__ARM_EABI__) \ |
- && !defined(__EABI__) \ |
- && !defined(__VFP_FP__) \ |
- && !defined(_WIN32_WCE) \ |
- && !defined(ANDROID) |
-#define WTF_CPU_MIDDLE_ENDIAN 1 |
- |
-#endif |
- |
-/* Set WTF_ARM_ARCH_VERSION */ |
-#if defined(__ARM_ARCH_4__) \ |
- || defined(__ARM_ARCH_4T__) \ |
- || defined(__MARM_ARMV4__) |
-#define WTF_ARM_ARCH_VERSION 4 |
- |
-#elif defined(__ARM_ARCH_5__) \ |
- || defined(__ARM_ARCH_5T__) \ |
- || defined(__MARM_ARMV5__) |
-#define WTF_ARM_ARCH_VERSION 5 |
- |
-#elif defined(__ARM_ARCH_5E__) \ |
- || defined(__ARM_ARCH_5TE__) \ |
- || defined(__ARM_ARCH_5TEJ__) |
-#define WTF_ARM_ARCH_VERSION 5 |
-/*ARMv5TE requires allocators to use aligned memory*/ |
-#define WTF_USE_ARENA_ALLOC_ALIGNMENT_INTEGER 1 |
- |
-#elif defined(__ARM_ARCH_6__) \ |
- || defined(__ARM_ARCH_6J__) \ |
- || defined(__ARM_ARCH_6K__) \ |
- || defined(__ARM_ARCH_6Z__) \ |
- || defined(__ARM_ARCH_6ZK__) \ |
- || defined(__ARM_ARCH_6T2__) \ |
- || defined(__ARMV6__) |
-#define WTF_ARM_ARCH_VERSION 6 |
- |
-#elif defined(__ARM_ARCH_7A__) \ |
- || defined(__ARM_ARCH_7R__) \ |
- || defined(__ARM_ARCH_7S__) |
-#define WTF_ARM_ARCH_VERSION 7 |
- |
-/* MSVC sets _M_ARM */ |
-#elif defined(_M_ARM) |
-#define WTF_ARM_ARCH_VERSION _M_ARM |
-#else |
-#define WTF_ARM_ARCH_VERSION 0 |
- |
-#endif |
- |
-/* Set WTF_THUMB_ARCH_VERSION */ |
-#if defined(__ARM_ARCH_4T__) |
-#define WTF_THUMB_ARCH_VERSION 1 |
- |
-#elif defined(__ARM_ARCH_5T__) \ |
- || defined(__ARM_ARCH_5TE__) \ |
- || defined(__ARM_ARCH_5TEJ__) |
-#define WTF_THUMB_ARCH_VERSION 2 |
- |
-#elif defined(__ARM_ARCH_6J__) \ |
- || defined(__ARM_ARCH_6K__) \ |
- || defined(__ARM_ARCH_6Z__) \ |
- || defined(__ARM_ARCH_6ZK__) \ |
- || defined(__ARM_ARCH_6M__) |
-#define WTF_THUMB_ARCH_VERSION 3 |
- |
-#elif defined(__ARM_ARCH_6T2__) \ |
- || defined(__ARM_ARCH_7__) \ |
- || defined(__ARM_ARCH_7A__) \ |
- || defined(__ARM_ARCH_7M__) \ |
- || defined(__ARM_ARCH_7R__) \ |
- || defined(__ARM_ARCH_7S__) |
-#define WTF_THUMB_ARCH_VERSION 4 |
- |
-#else |
-#define WTF_THUMB_ARCH_VERSION 0 |
-#endif |
- |
- |
-/* CPU(ARM_TRADITIONAL) - Thumb2 is not available, only traditional ARM (v4 or greater) */ |
-/* CPU(ARM_THUMB2) - Thumb2 instruction set is available */ |
-/* Only one of these will be defined. */ |
-#if !defined(WTF_CPU_ARM_TRADITIONAL) && !defined(WTF_CPU_ARM_THUMB2) |
-# if defined(thumb2) || defined(__thumb2__) \ |
- || ((defined(__thumb) || defined(__thumb__)) && WTF_THUMB_ARCH_VERSION == 4) |
-# define WTF_CPU_ARM_TRADITIONAL 0 |
-# define WTF_CPU_ARM_THUMB2 1 |
-# elif WTF_ARM_ARCH_AT_LEAST(4) |
-# define WTF_CPU_ARM_TRADITIONAL 1 |
-# define WTF_CPU_ARM_THUMB2 0 |
-# else |
-# error "Not supported ARM architecture" |
-# endif |
-#elif CPU(ARM_TRADITIONAL) && CPU(ARM_THUMB2) /* Sanity Check */ |
-# error "Cannot use both of WTF_CPU_ARM_TRADITIONAL and WTF_CPU_ARM_THUMB2 platforms" |
-#endif /* !defined(WTF_CPU_ARM_TRADITIONAL) && !defined(WTF_CPU_ARM_THUMB2) */ |
- |
-#if defined(__ARM_NEON__) && !defined(WTF_CPU_ARM_NEON) |
-#define WTF_CPU_ARM_NEON 1 |
-#endif |
- |
-#if CPU(ARM_NEON) && (!COMPILER(GCC) || GCC_VERSION_AT_LEAST(4, 7, 0)) |
-// All NEON intrinsics usage can be disabled by this macro. |
-#define HAVE_ARM_NEON_INTRINSICS 1 |
-#endif |
- |
-#if defined(__ARM_ARCH_7S__) |
-#define WTF_CPU_APPLE_ARMV7S 1 |
-#endif |
- |
-#endif /* ARM */ |
- |
/* ==== OS() - underlying operating system; only to be used for mandated low-level services like |
virtual memory, not to choose a GUI toolkit ==== */ |