Fix ARM thumb2 mode detection
authorSimon Hausmann <simon.hausmann@digia.com>
Thu, 17 Oct 2013 11:18:30 +0000 (13:18 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Thu, 17 Oct 2013 13:52:36 +0000 (15:52 +0200)
__TARGET_ARCH_THUMB may not always be defined, but __thumb2__ for example
is also a good indicator that we can generated and run thumb2 code and
thus enable the JIT.

Change-Id: I987d0af5883d9bb844c4c99a0691a12aedc94ff5
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
src/qml/jsruntime/qv4global_p.h

index 2050ccd..e7b5a67 100644 (file)
@@ -72,10 +72,14 @@ inline double trunc(double d) { return d > 0 ? floor(d) : ceil(d); }
 #define V4_ENABLE_JIT
 #elif defined(Q_PROCESSOR_X86_64)
 #define V4_ENABLE_JIT
-#elif defined(Q_PROCESSOR_ARM_32) && __TARGET_ARCH_THUMB-0 == 4
+#elif defined(Q_PROCESSOR_ARM_32)
+
+#if defined(thumb2) || defined(__thumb2__) || ((defined(__thumb) || defined(__thumb__)) && __TARGET_ARCH_THUMB-0 == 4)
 #define V4_ENABLE_JIT
 #endif
 
+#endif
+
 // Black list some platforms
 #if defined(V4_ENABLE_JIT)
 #if defined(Q_OS_WINCE) || defined(Q_OS_IOS) || defined(Q_OS_WIN64)