diff options
author | Janne Anttila <janne.anttila@digia.com> | 2012-08-09 08:52:39 +0300 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-08-20 16:58:23 +0200 |
commit | 3ef95347feef61a9d3d36763bb8dc65217827922 (patch) | |
tree | f65a0afa5b9d8c9188bd26a79e7cf25f1b12b43d | |
parent | eda5d42ab9e5f55e08ed0e43cf7d12d59e4ef892 (diff) |
Fix processor detection for MSVC ARM compiler (WEC7).
Visual Studio compiler defines _M_ARM preprocessor variable when
compiling for ARM and the value of preprocessor variable indicates the
supported instruction set.
For more information see:
http://msdn.microsoft.com/en-us/library/gg155713.aspx
Change-Id: I54137257b83f64fdf03bf7df9995e08d16dff4df
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-rw-r--r-- | src/corelib/global/qprocessordetection.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/corelib/global/qprocessordetection.h b/src/corelib/global/qprocessordetection.h index f030f64443..cc6500c4ed 100644 --- a/src/corelib/global/qprocessordetection.h +++ b/src/corelib/global/qprocessordetection.h @@ -95,13 +95,14 @@ ARM is bi-endian, detect using __ARMEL__ or __ARMEB__, falling back to auto-detection implemented below. */ -#if defined(__arm__) || defined(__TARGET_ARCH_ARM) +#if defined(__arm__) || defined(__TARGET_ARCH_ARM) || defined(_M_ARM) # define Q_PROCESSOR_ARM # if defined(__ARM_ARCH_7__) \ || defined(__ARM_ARCH_7A__) \ || defined(__ARM_ARCH_7R__) \ || defined(__ARM_ARCH_7M__) \ - || (defined(__TARGET_ARCH_ARM) && __TARGET_ARCH_ARM-0 >= 7) + || (defined(__TARGET_ARCH_ARM) && __TARGET_ARCH_ARM-0 >= 7) \ + || (defined(_M_ARM) && _M_ARM-0 >= 7) # define Q_PROCESSOR_ARM_V7 # define Q_PROCESSOR_ARM_V6 # define Q_PROCESSOR_ARM_V5 @@ -112,11 +113,13 @@ || defined(__ARM_ARCH_6K__) \ || defined(__ARM_ARCH_6ZK__) \ || defined(__ARM_ARCH_6M__) \ - || (defined(__TARGET_ARCH_ARM) && __TARGET_ARCH_ARM-0 >= 6) + || (defined(__TARGET_ARCH_ARM) && __TARGET_ARCH_ARM-0 >= 6) \ + || (defined(_M_ARM) && _M_ARM-0 >= 6) # define Q_PROCESSOR_ARM_V6 # define Q_PROCESSOR_ARM_V5 # elif defined(__ARM_ARCH_5TEJ__) \ - || (defined(__TARGET_ARCH_ARM) && __TARGET_ARCH_ARM-0 >= 5) + || (defined(__TARGET_ARCH_ARM) && __TARGET_ARCH_ARM-0 >= 5) \ + || (defined(_M_ARM) && _M_ARM-0 >= 5) # define Q_PROCESSOR_ARM_V5 # endif # if defined(__ARMEL__) |