From 0fada59c49a06cec8bfca72eb86ad340967b6f26 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Tue, 3 Jan 2017 15:58:12 +0100 Subject: Clarify JIT selection for 32-bit and 64-bit architectures Instead of relying on the somewhat "cryptic" ILP32 macro on x86/x86-64, we can also use the macro that the JIT generated code _really_ relies on, which is the size of pointers. For x32 those will be 4 despite Q_PROCESSOR_X86_64, and the JIT will end up disabled. For regular x86 and x86-64 it should get enabled. The same logic is applied to ARM32/ARM64 to disable the JIT once machines start showing up with ILP32 data model on ARM64. Change-Id: Id8dfb203c9b75e8ed5a61dcae28482f8f99be75f Reviewed-by: Thiago Macieira Reviewed-by: Dmitry Shachnev --- src/qml/jsruntime/qv4global_p.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 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 c37ad1668d..1dbc538be2 100644 --- a/src/qml/jsruntime/qv4global_p.h +++ b/src/qml/jsruntime/qv4global_p.h @@ -97,19 +97,19 @@ inline double trunc(double d) { return d > 0 ? floor(d) : ceil(d); } // // NOTE: This should match the logic in qv4targetplatform_p.h! -#if defined(Q_PROCESSOR_X86) && !defined(__ILP32__) \ +#if defined(Q_PROCESSOR_X86) && (QT_POINTER_SIZE == 4) \ && (defined(Q_OS_WIN) || defined(Q_OS_LINUX) || defined(Q_OS_QNX) || defined(Q_OS_FREEBSD)) # define V4_ENABLE_JIT -#elif defined(Q_PROCESSOR_X86_64) && !defined(__ILP32__) \ +#elif defined(Q_PROCESSOR_X86_64) && (QT_POINTER_SIZE == 8) \ && (defined(Q_OS_WIN) || defined(Q_OS_LINUX) || defined(Q_OS_MAC) || defined(Q_OS_FREEBSD)) # define V4_ENABLE_JIT -#elif defined(Q_PROCESSOR_ARM_32) +#elif defined(Q_PROCESSOR_ARM_32) && (QT_POINTER_SIZE == 4) # 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) +#elif defined(Q_PROCESSOR_ARM_64) && (QT_POINTER_SIZE == 8) # if defined(Q_OS_LINUX) # define V4_ENABLE_JIT # endif -- cgit v1.2.3