diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/3rdparty/masm/masm-defs.pri | 4 | ||||
-rw-r--r-- | src/qml/jit/qv4targetplatform_p.h | 4 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4global_p.h | 27 |
3 files changed, 22 insertions, 13 deletions
diff --git a/src/3rdparty/masm/masm-defs.pri b/src/3rdparty/masm/masm-defs.pri index bfcccfeeaa..c4c7d3ce9a 100644 --- a/src/3rdparty/masm/masm-defs.pri +++ b/src/3rdparty/masm/masm-defs.pri @@ -30,6 +30,10 @@ disassembler { DEFINES += WTF_USE_UDIS86=0 } +force-compile-jit { + DEFINES += V4_FORCE_COMPILE_JIT +} + INCLUDEPATH += $$PWD/disassembler INCLUDEPATH += $$PWD/disassembler/udis86 INCLUDEPATH += $$_OUT_PWD diff --git a/src/qml/jit/qv4targetplatform_p.h b/src/qml/jit/qv4targetplatform_p.h index 878c1dd9fd..80a18a7f5b 100644 --- a/src/qml/jit/qv4targetplatform_p.h +++ b/src/qml/jit/qv4targetplatform_p.h @@ -82,7 +82,7 @@ namespace JIT { class TargetPlatform { public: -#if CPU(X86) && (OS(LINUX) || OS(WINDOWS) || OS(QNX) || OS(FREEBSD)) +#if CPU(X86) && (OS(LINUX) || OS(WINDOWS) || OS(QNX) || OS(FREEBSD) || defined(Q_OS_IOS)) enum { RegAllocIsSupported = 1 }; static const JSC::MacroAssembler::RegisterID FramePointerRegister = JSC::X86Registers::ebp; @@ -151,7 +151,7 @@ public: #endif // Windows on x86 -#if CPU(X86_64) && (OS(LINUX) || OS(MAC_OS_X) || OS(FREEBSD)) +#if CPU(X86_64) && (OS(LINUX) || OS(MAC_OS_X) || OS(FREEBSD) || defined(Q_OS_IOS)) enum { RegAllocIsSupported = 1 }; static const JSC::MacroAssembler::RegisterID FramePointerRegister = JSC::X86Registers::ebp; 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 |