From 68beab39a76d567e153e631838a067db8fb7a7c4 Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Fri, 15 Jan 2016 10:28:20 +0100 Subject: 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 --- src/qml/jsruntime/qv4global_p.h | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) (limited to 'src/qml/jsruntime/qv4global_p.h') 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 -- cgit v1.2.3