aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4global_p.h
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@digia.com>2016-01-15 10:28:20 +0100
committerErik Verbruggen <erik.verbruggen@theqtcompany.com>2016-01-20 08:58:06 +0000
commit68beab39a76d567e153e631838a067db8fb7a7c4 (patch)
treea71f9001aef9fa77b3ea0a9bdc4c7031f50b852d /src/qml/jsruntime/qv4global_p.h
parentde846aec97647862c98419a3f37a432031d9a245 (diff)
V4: Tweak "enable JIT" ifdefs.
- indentation, to make it readable - on arm64: only enable for Linux (but only after future testing!) - add CONFIG+=force-compile-jit handling so the JIT can be compiled/used even on platforms that don't officially support it (like iOS, where it works if you run from Xcode). This is done for debugging purposes. Change-Id: I8611ba409e10305f480463a16d88bc854b1c218a Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/jsruntime/qv4global_p.h')
-rw-r--r--src/qml/jsruntime/qv4global_p.h27
1 files changed, 16 insertions, 11 deletions
diff --git a/src/qml/jsruntime/qv4global_p.h b/src/qml/jsruntime/qv4global_p.h
index 99ba1ec81c..b0850a9db3 100644
--- a/src/qml/jsruntime/qv4global_p.h
+++ b/src/qml/jsruntime/qv4global_p.h
@@ -93,22 +93,22 @@ inline double trunc(double d) { return d > 0 ? floor(d) : ceil(d); }
#if defined(Q_PROCESSOR_X86) && !defined(__ILP32__) \
&& (defined(Q_OS_WIN) || defined(Q_OS_LINUX) || defined(Q_OS_QNX) || defined(Q_OS_FREEBSD))
-#define V4_ENABLE_JIT
+# define V4_ENABLE_JIT
#elif defined(Q_PROCESSOR_X86_64) && !defined(__ILP32__) \
&& (defined(Q_OS_WIN) || defined(Q_OS_LINUX) || defined(Q_OS_MAC) || defined(Q_OS_FREEBSD))
-#define V4_ENABLE_JIT
+# define V4_ENABLE_JIT
#elif defined(Q_PROCESSOR_ARM_32)
-
-#if defined(thumb2) || defined(__thumb2__) || ((defined(__thumb) || defined(__thumb__)) && __TARGET_ARCH_THUMB-0 == 4)
-#define V4_ENABLE_JIT
-#elif defined(__ARM_ARCH_ISA_THUMB) && __ARM_ARCH_ISA_THUMB == 2 // clang 3.5 and later will set this if the core supports the Thumb-2 ISA.
-#define V4_ENABLE_JIT
-#endif
-
+# if defined(thumb2) || defined(__thumb2__) || ((defined(__thumb) || defined(__thumb__)) && __TARGET_ARCH_THUMB-0 == 4)
+# define V4_ENABLE_JIT
+# elif defined(__ARM_ARCH_ISA_THUMB) && __ARM_ARCH_ISA_THUMB == 2 // clang 3.5 and later will set this if the core supports the Thumb-2 ISA.
+# define V4_ENABLE_JIT
+# endif
#elif defined(Q_PROCESSOR_ARM_64)
-#define V4_ENABLE_JIT // iOS is disabled below.
+# if defined(Q_OS_LINUX) && 0 // TODO: test on Linux/aarch64 before enabling this
+# define V4_ENABLE_JIT
+# endif
#elif defined(Q_PROCESSOR_MIPS_32) && defined(Q_OS_LINUX)
-#define V4_ENABLE_JIT
+# define V4_ENABLE_JIT
#endif
// Black list some platforms
@@ -118,6 +118,11 @@ inline double trunc(double d) { return d > 0 ? floor(d) : ceil(d); }
#endif
#endif
+// For debug purposes: add CONFIG+=force-compile-jit to qmake's command-line to always compile the JIT.
+#if defined(V4_FORCE_COMPILE_JIT) && !defined(V4_ENABLE_JIT)
+# define V4_ENABLE_JIT
+#endif
+
// Do certain things depending on whether the JIT is enabled or disabled
#ifdef V4_ENABLE_JIT