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 <thiago.macieira@intel.com> Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
This commit is contained in:
parent
4038160a32
commit
0fada59c49
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue